Commit c85ca6f1 authored by fangxinjiang's avatar fangxinjiang

自动化派单

parent c5394628
...@@ -48,7 +48,7 @@ public class FailReasonConfig extends BaseEntity { ...@@ -48,7 +48,7 @@ public class FailReasonConfig extends BaseEntity {
@Length(max = 20, message = "关键字不能超过20个字符") @Length(max = 20, message = "关键字不能超过20个字符")
@ExcelProperty("关键字") @ExcelProperty("关键字")
@Schema(description = "关键字") @Schema(description = "关键字")
private String keys; private String reasonKey;
/** /**
* 精简原因 * 精简原因
*/ */
......
...@@ -54,10 +54,9 @@ public class FailReasonConfigController { ...@@ -54,10 +54,9 @@ public class FailReasonConfigController {
* @param failReasonConfig 失败原因配置 * @param failReasonConfig 失败原因配置
* @return R * @return R
*/ */
@Operation(summary = "新增失败原因配置", description = "新增失败原因配置:hasPermission('social_failreasonconfig_add')") @Operation(summary = "新增失败原因配置", description = "新增失败原因配置")
@SysLog("新增失败原因配置" ) @SysLog("新增失败原因配置" )
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_add')" )
public R<Boolean> save(@RequestBody FailReasonConfig failReasonConfig) { public R<Boolean> save(@RequestBody FailReasonConfig failReasonConfig) {
return R.ok(failReasonConfigService.save(failReasonConfig)); return R.ok(failReasonConfigService.save(failReasonConfig));
} }
...@@ -67,10 +66,9 @@ public class FailReasonConfigController { ...@@ -67,10 +66,9 @@ public class FailReasonConfigController {
* @param failReasonConfig 失败原因配置 * @param failReasonConfig 失败原因配置
* @return R * @return R
*/ */
@Operation(summary = "修改失败原因配置", description = "修改失败原因配置:hasPermission('social_failreasonconfig_edit')") @Operation(summary = "修改失败原因配置", description = "修改失败原因配置)")
@SysLog("修改失败原因配置" ) @SysLog("修改失败原因配置" )
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_edit')" )
public R<Boolean> updateById(@RequestBody FailReasonConfig failReasonConfig) { public R<Boolean> updateById(@RequestBody FailReasonConfig failReasonConfig) {
return R.ok(failReasonConfigService.updateById(failReasonConfig)); return R.ok(failReasonConfigService.updateById(failReasonConfig));
} }
...@@ -80,10 +78,9 @@ public class FailReasonConfigController { ...@@ -80,10 +78,9 @@ public class FailReasonConfigController {
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id删除失败原因配置", description = "通过id删除失败原因配置:hasPermission('social_failreasonconfig_del')") @Operation(summary = "通过id删除失败原因配置", description = "通过id删除失败原因配置")
@SysLog("通过id删除失败原因配置" ) @SysLog("通过id删除失败原因配置" )
@DeleteMapping("/{id}" ) @DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_del')" )
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return R.ok(failReasonConfigService.removeById(id)); return R.ok(failReasonConfigService.removeById(id));
} }
......
...@@ -43,7 +43,7 @@ public class FailReasonConfigServiceImpl extends ServiceImpl<FailReasonConfigMap ...@@ -43,7 +43,7 @@ public class FailReasonConfigServiceImpl extends ServiceImpl<FailReasonConfigMap
Map<String, FailReasonConfig> map = new HashMap<>(); Map<String, FailReasonConfig> map = new HashMap<>();
List<FailReasonConfig> list = baseMapper.getFailReasonConfigList(); List<FailReasonConfig> list = baseMapper.getFailReasonConfigList();
for (FailReasonConfig config : list) { for (FailReasonConfig config : list) {
map.put(config.getKeys(), config); map.put(config.getReasonKey(), config);
} }
return map; return map;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<resultMap id="failReasonConfigMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig"> <resultMap id="failReasonConfigMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig">
<id property="id" column="ID"/> <id property="id" column="ID"/>
<result property="reason" column="REASON"/> <result property="reason" column="REASON"/>
<result property="keys" column="KEYS"/> <result property="reasonKey" column="REASON_KEY"/>
<result property="simpleReason" column="SIMPLE_REASON"/> <result property="simpleReason" column="SIMPLE_REASON"/>
<result property="replay" column="REPLAY"/> <result property="replay" column="REPLAY"/>
<result property="status" column="STATUS"/> <result property="status" column="STATUS"/>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.REASON, a.REASON,
a.`KEYS`, a.REASON_KEY,
a.SIMPLE_REASON, a.SIMPLE_REASON,
a.REPLAY, a.REPLAY,
a.`STATUS`, a.`STATUS`,
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<if test="failReasonConfig.reason != null and failReasonConfig.reason.trim() != ''"> <if test="failReasonConfig.reason != null and failReasonConfig.reason.trim() != ''">
AND a.REASON LIKE concat('%',#{failReasonConfig.reason},'%') AND a.REASON LIKE concat('%',#{failReasonConfig.reason},'%')
</if> </if>
<if test="failReasonConfig.keys != null and failReasonConfig.keys.trim() != ''"> <if test="failReasonConfig.reasonKey != null and failReasonConfig.reasonKey.trim() != ''">
AND a.KEYS = #{failReasonConfig.keys} AND a.REASON_KEY = #{failReasonConfig.reasonKey}
</if> </if>
<if test="failReasonConfig.simpleReason != null and failReasonConfig.simpleReason.trim() != ''"> <if test="failReasonConfig.simpleReason != null and failReasonConfig.simpleReason.trim() != ''">
AND a.SIMPLE_REASON = #{failReasonConfig.simpleReason} AND a.SIMPLE_REASON = #{failReasonConfig.simpleReason}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment