后台接口问题修复

This commit is contained in:
donqi 2022-06-16 23:16:21 +08:00
parent de09e5bf81
commit 2f81f01801
6 changed files with 11 additions and 8 deletions

View File

@ -23,7 +23,7 @@ public class SpecialSkillController {
@PostMapping("list")
@ResponseBody
public AjaxResult list(SpecialSkill specialSkill) {
public AjaxResult list(@RequestBody SpecialSkill specialSkill) {
return AjaxResult.success(specialSkillService.list(specialSkill));
}

View File

@ -4,7 +4,6 @@ import com.ghy.common.core.controller.BaseController;
import com.ghy.common.core.domain.AjaxResult;
import com.ghy.common.core.page.TableDataInfo;
import com.ghy.common.utils.ExceptionUtil;
import com.ghy.common.utils.StringUtils;
import com.ghy.web.pojo.vo.WorkerSettledRequest;
import com.ghy.worker.domain.Worker;
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.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import java.lang.reflect.Field;
import java.util.List;
/**
@ -85,6 +82,7 @@ public class WorkerController extends BaseController {
specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
return AjaxResult.success("保存成功");
} catch (Exception e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
return AjaxResult.error(e.getMessage());
}

View File

@ -280,6 +280,7 @@ public class ShiroConfig
filterChainDefinitionMap.put("/pay/**", "anon");
filterChainDefinitionMap.put("/order/**", "anon");
filterChainDefinitionMap.put("/worker/**", "anon");
filterChainDefinitionMap.put("/special/skill/**", "anon");
filterChainDefinitionMap.put("/customer/**", "anon");
filterChainDefinitionMap.put("/goods/**", "anon");
filterChainDefinitionMap.put("/financial/**", "anon");

View File

@ -1,9 +1,11 @@
package com.ghy.worker.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ghy.common.core.domain.BaseEntity;
import lombok.Data;
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;
}

View File

@ -55,7 +55,7 @@
<where>
<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="goodsCategoryId != null and goodsCategoryId > 0">goods_category_id = #{provinceId}</if>
<if test="goodsCategoryId != null and goodsCategoryId > 0">goods_category_id = #{goodsCategoryId}</if>
</where>
</select>

View File

@ -47,7 +47,7 @@
create_by, create_time)
VALUES
<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())
</foreach>
</insert>