Commit bff17062596b49f67c1c98f3fa3eb853aed093eb
1 parent
9e842106
README:增加 FMS、HRM 说明(别催进度了,token 都冒烟了)
Showing
2 changed files
with
38 additions
and
2 deletions
yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/controller/admin/recruit/vo/post/HrmRecruitPostSaveReqVO.java
| 1 | 1 | package cn.iocoder.yudao.module.hrm.controller.admin.recruit.vo.post; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.module.system.framework.operatelog.core.AreaParseFunction; | |
| 3 | +import cn.iocoder.yudao.module.hrm.framework.operatelog.core.HrmAreaParseFunction; | |
| 4 | 4 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 5 | 5 | import com.mzt.logapi.starter.annotation.DiffLogField; |
| 6 | 6 | import io.swagger.v3.oas.annotations.media.Schema; |
| ... | ... | @@ -43,7 +43,7 @@ public class HrmRecruitPostSaveReqVO { |
| 43 | 43 | private Integer jobNature; |
| 44 | 44 | |
| 45 | 45 | @Schema(description = "工作城市地区编号", example = "310115") |
| 46 | - @DiffLogField(name = "工作城市", function = AreaParseFunction.NAME) | |
| 46 | + @DiffLogField(name = "工作城市", function = HrmAreaParseFunction.NAME) | |
| 47 | 47 | private Integer areaId; |
| 48 | 48 | |
| 49 | 49 | @Schema(description = "招聘人数", example = "3") | ... | ... |
yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/framework/operatelog/core/HrmAreaParseFunction.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.hrm.framework.operatelog.core; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.StrUtil; | |
| 4 | +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; | |
| 5 | +import com.mzt.logapi.service.IParseFunction; | |
| 6 | +import org.springframework.stereotype.Component; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 地名的 {@link IParseFunction} 实现类 | |
| 10 | + * | |
| 11 | + * @author 芋道源码 | |
| 12 | + */ | |
| 13 | +@Component("hrmAreaParseFunction") | |
| 14 | +public class HrmAreaParseFunction implements IParseFunction { | |
| 15 | + | |
| 16 | + public static final String NAME = "getArea"; | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public boolean executeBefore() { | |
| 20 | + return true; | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public String functionName() { | |
| 25 | + return NAME; | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public String apply(Object value) { | |
| 30 | + if (StrUtil.isEmptyIfStr(value)) { | |
| 31 | + return ""; | |
| 32 | + } | |
| 33 | + return AreaUtils.format(Integer.parseInt(value.toString())); | |
| 34 | + } | |
| 35 | + | |
| 36 | +} | ... | ... |