后台接口问题修复
This commit is contained in:
parent
de09e5bf81
commit
2f81f01801
|
|
@ -23,7 +23,7 @@ public class SpecialSkillController {
|
||||||
|
|
||||||
@PostMapping("list")
|
@PostMapping("list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult list(SpecialSkill specialSkill) {
|
public AjaxResult list(@RequestBody SpecialSkill specialSkill) {
|
||||||
return AjaxResult.success(specialSkillService.list(specialSkill));
|
return AjaxResult.success(specialSkillService.list(specialSkill));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.ghy.common.core.controller.BaseController;
|
||||||
import com.ghy.common.core.domain.AjaxResult;
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
import com.ghy.common.core.page.TableDataInfo;
|
import com.ghy.common.core.page.TableDataInfo;
|
||||||
import com.ghy.common.utils.ExceptionUtil;
|
import com.ghy.common.utils.ExceptionUtil;
|
||||||
import com.ghy.common.utils.StringUtils;
|
|
||||||
import com.ghy.web.pojo.vo.WorkerSettledRequest;
|
import com.ghy.web.pojo.vo.WorkerSettledRequest;
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import com.ghy.worker.service.WorkerAreaService;
|
import com.ghy.worker.service.WorkerAreaService;
|
||||||
|
|
@ -15,10 +14,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Assert;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -85,6 +82,7 @@ public class WorkerController extends BaseController {
|
||||||
specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
||||||
return AjaxResult.success("保存成功");
|
return AjaxResult.success("保存成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,7 @@ public class ShiroConfig
|
||||||
filterChainDefinitionMap.put("/pay/**", "anon");
|
filterChainDefinitionMap.put("/pay/**", "anon");
|
||||||
filterChainDefinitionMap.put("/order/**", "anon");
|
filterChainDefinitionMap.put("/order/**", "anon");
|
||||||
filterChainDefinitionMap.put("/worker/**", "anon");
|
filterChainDefinitionMap.put("/worker/**", "anon");
|
||||||
|
filterChainDefinitionMap.put("/special/skill/**", "anon");
|
||||||
filterChainDefinitionMap.put("/customer/**", "anon");
|
filterChainDefinitionMap.put("/customer/**", "anon");
|
||||||
filterChainDefinitionMap.put("/goods/**", "anon");
|
filterChainDefinitionMap.put("/goods/**", "anon");
|
||||||
filterChainDefinitionMap.put("/financial/**", "anon");
|
filterChainDefinitionMap.put("/financial/**", "anon");
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
package com.ghy.worker.domain;
|
package com.ghy.worker.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ghy.common.core.domain.BaseEntity;
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 师傅特殊技能关系表
|
* 师傅特殊技能关系表
|
||||||
|
|
@ -36,9 +38,11 @@ public class WorkerSpecialSkill extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 保险生效日期
|
* 保险生效日期
|
||||||
*/
|
*/
|
||||||
private LocalDate insuranceStart;
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date insuranceStart;
|
||||||
/**
|
/**
|
||||||
* 保险截止日期
|
* 保险截止日期
|
||||||
*/
|
*/
|
||||||
private LocalDate insuranceEnd;
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date insuranceEnd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<where>
|
<where>
|
||||||
<if test="specialSkillId != null and specialSkillId > 0">special_skill_id = #{specialSkillId}</if>
|
<if test="specialSkillId != null and specialSkillId > 0">special_skill_id = #{specialSkillId}</if>
|
||||||
<if test="specialSkillName != null and specialSkillName !=''">special_skill_name = #{specialSkillName}</if>
|
<if test="specialSkillName != null and specialSkillName !=''">special_skill_name = #{specialSkillName}</if>
|
||||||
<if test="goodsCategoryId != null and goodsCategoryId > 0">goods_category_id = #{provinceId}</if>
|
<if test="goodsCategoryId != null and goodsCategoryId > 0">goods_category_id = #{goodsCategoryId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
create_by, create_time)
|
create_by, create_time)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach collection="workerSpecialSkills" separator="," item="item">
|
<foreach collection="workerSpecialSkills" separator="," item="item">
|
||||||
(#{item.workerId}, #{item.specialSkillId}, #{item.credential}, #{item.insurance}, #{item.insuranceStart}
|
(#{item.workerId}, #{item.specialSkillId}, #{item.credential}, #{item.insurance}, #{item.insuranceStart},
|
||||||
#{item.insuranceEnd}, #{item.workerId}, sysdate())
|
#{item.insuranceEnd}, #{item.workerId}, sysdate())
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue