queryCustInfoDetailForApp

This commit is contained in:
sxu 2025-04-27 16:34:53 +08:00
parent 61a5e02b85
commit b13833bbee
4 changed files with 20 additions and 7 deletions

View File

@ -20,6 +20,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import static com.bonus.canteen.core.common.encrypt.SM4EncryptUtils.sm4Encrypt;
import static com.bonus.common.core.utils.PageUtils.startPage; import static com.bonus.common.core.utils.PageUtils.startPage;
import static com.bonus.common.core.web.domain.AjaxResult.success; import static com.bonus.common.core.web.domain.AjaxResult.success;
import static com.bonus.canteen.core.common.encrypt.SM4EncryptUtils.sm4Decrypt; import static com.bonus.canteen.core.common.encrypt.SM4EncryptUtils.sm4Decrypt;
@ -87,6 +88,7 @@ public class CustInfoController extends BaseController {
Integer sourceType = this.getSourceTypeByHeaders(headers); Integer sourceType = this.getSourceTypeByHeaders(headers);
sourceType = Objects.isNull(sourceType) ? SourceTypeEnum.HT_H5_MOBILE.getKey() : sourceType; sourceType = Objects.isNull(sourceType) ? SourceTypeEnum.HT_H5_MOBILE.getKey() : sourceType;
AjaxResult ar = new AjaxResult(); AjaxResult ar = new AjaxResult();
custInfo.setMobile(sm4Encrypt(custInfo.getMobile()));
CustInfoVo result = this.custInfoService.queryCustInfoDetail(custInfo, sourceType); CustInfoVo result = this.custInfoService.queryCustInfoDetail(custInfo, sourceType);
//System.out.println(sm4Decrypt("29G1AUHDmLvPe1tt0t12Dw==##encrypted")); //System.out.println(sm4Decrypt("29G1AUHDmLvPe1tt0t12Dw==##encrypted"));
result.setMobile(sm4Decrypt(result.getMobile())); result.setMobile(sm4Decrypt(result.getMobile()));

View File

@ -23,10 +23,11 @@ public class CustInfo {
@ApiModelProperty("主键自增") @ApiModelProperty("主键自增")
private Long id; private Long id;
@ApiModelProperty("人员id") @ApiModelProperty("人员id")
private @NotNull( // private @NotNull(
message = "{customer.id.nonNull}", // message = "{customer.id.nonNull}",
groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class} // groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}
) Long custId; //)
Long custId;
@ApiModelProperty("人员编号") @ApiModelProperty("人员编号")
private @NotNull( private @NotNull(
message = "{customer.num.nonNull}", message = "{customer.num.nonNull}",

View File

@ -157,7 +157,11 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
protected CustInfoVo getNormalCustInfoDetail(CustInfo custInfo, Integer sourceType) { protected CustInfoVo getNormalCustInfoDetail(CustInfo custInfo, Integer sourceType) {
custInfo.setCustState(PersonalStatusEnum.NORMAL.getKey()); custInfo.setCustState(PersonalStatusEnum.NORMAL.getKey());
CustInfoVo custInfoVo = custInfoMapper.queryCustInfoDetail(custInfo); CustInfoVo custInfoVo = custInfoMapper.queryCustInfoDetail(custInfo);
return addOrUpdateCustCasual(custInfoVo, sourceType); if (ObjectUtil.isNotNull(custInfoVo)) {
return addOrUpdateCustCasual(custInfoVo, sourceType);
} else {
return null;
}
} }
public CustInfoVo addOrUpdateCustCasual(CustInfoVo custInfoVo, Integer sourceType) { public CustInfoVo addOrUpdateCustCasual(CustInfoVo custInfoVo, Integer sourceType) {

View File

@ -103,8 +103,14 @@
LEFT JOIN cust_place place ON ci.place_id = place.place_id LEFT JOIN cust_place place ON ci.place_id = place.place_id
LEFT JOIN cust_cost_center A ON A.cost_center_id = ci.cost_center_id LEFT JOIN cust_cost_center A ON A.cost_center_id = ci.cost_center_id
LEFT JOIN cust_casual cc on ci.cust_id = cc.cust_id LEFT JOIN cust_casual cc on ci.cust_id = cc.cust_id
where ci.cust_id = #{info.custId} where
and ci.cust_state = #{info.custState} ci.cust_state = #{info.custState}
<if test="info.custId != null">
and ci.cust_id = #{info.custId}
</if>
<if test="info.mobile != null">
and ci.mobile = #{info.mobile}
</if>
</select> </select>
<!-- 查询用户详细信息 --> <!-- 查询用户详细信息 -->