增加账户
This commit is contained in:
parent
240ebbe008
commit
b563839c88
|
|
@ -133,7 +133,7 @@ public class AccInfoServiceImpl extends ServiceImpl<AccInfoMapper, AccInfo> impl
|
|||
}
|
||||
|
||||
this.accWalletInfoService.insertBatch(accWalletInfos);
|
||||
this.accOperationRecordService.addAccOperationRecord(accInfoAddPO.getCustId(), accInfo.getAccStatus());
|
||||
//this.accOperationRecordService.addAccOperationRecord(accInfoAddPO.getCustId(), accInfo.getAccStatus());
|
||||
return accId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class CustInfoController extends BaseController {
|
|||
@Autowired
|
||||
CustInfoService custInfoService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@ApiOperation("新增账户")
|
||||
@PostMapping({"/addCustInfo"})
|
||||
public AjaxResult addCustInfo(@Validated({ValidationGroups.Insert.class}) @RequestBody CustInfoModel infoModel) {
|
||||
this.custInfoService.addCustInfo(infoModel);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import com.bonus.canteen.core.common.utils.SysUtil;
|
|||
import com.bonus.common.houqin.utils.ValidationGroups;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -28,27 +27,21 @@ public class CustInfo {
|
|||
groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}
|
||||
) Long custId;
|
||||
@ApiModelProperty("人员编号")
|
||||
private @NotNull(
|
||||
message = "{customer.num.nonNull}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) String custNum;
|
||||
String custNum;
|
||||
@ApiModelProperty("人员姓名")
|
||||
@TableField(
|
||||
value = "nick_name",
|
||||
typeHandler = SM4EncDecHandler.class
|
||||
)
|
||||
private @NotNull(
|
||||
message = "{customer.name.nonNull}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) String custName;
|
||||
String custName;
|
||||
@ApiModelProperty("人员姓名")
|
||||
@TableField(
|
||||
value = "nick_name_like",
|
||||
typeHandler = CipherQueryLikeHandler.class
|
||||
)
|
||||
private String custNameLike;
|
||||
@ApiModelProperty("人员限制id")
|
||||
private Integer custLimitId;
|
||||
// @ApiModelProperty("人员限制id")
|
||||
// private Integer custLimitId;
|
||||
// @ApiModelProperty("第三方人员id")
|
||||
// private String custThirdId;
|
||||
// @ApiModelProperty("推送到设备上,生成的用户id")
|
||||
|
|
@ -100,10 +93,7 @@ public class CustInfo {
|
|||
private String headPortraitUrl;
|
||||
@ApiModelProperty("所属组织id")
|
||||
@TableField(value = "dept_id")
|
||||
private @NotNull(
|
||||
message = "{customer.org.nonNull}",
|
||||
groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
|
||||
) Long orgId;
|
||||
Long orgId;
|
||||
// @ApiModelProperty("机构编号")
|
||||
// private String orgNum;
|
||||
// @ApiModelProperty("机构全称")
|
||||
|
|
@ -113,13 +103,13 @@ public class CustInfo {
|
|||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private Long costCenterId;
|
||||
@ApiModelProperty("所属位置")
|
||||
@TableField(
|
||||
updateStrategy = FieldStrategy.IGNORED
|
||||
)
|
||||
private Long placeId;
|
||||
@ApiModelProperty("所属位置名称")
|
||||
private String placeFullName;
|
||||
// @ApiModelProperty("所属位置")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private Long placeId;
|
||||
// @ApiModelProperty("所属位置名称")
|
||||
// private String placeFullName;
|
||||
@ApiModelProperty("人员类别")
|
||||
@TableField(
|
||||
updateStrategy = FieldStrategy.IGNORED
|
||||
|
|
@ -258,9 +248,9 @@ public class CustInfo {
|
|||
return this.custNameLike;
|
||||
}
|
||||
|
||||
public Integer getCustLimitId() {
|
||||
return this.custLimitId;
|
||||
}
|
||||
// public Integer getCustLimitId() {
|
||||
// return this.custLimitId;
|
||||
// }
|
||||
|
||||
// public String getCustThirdId() {
|
||||
// return this.custThirdId;
|
||||
|
|
@ -334,13 +324,13 @@ public class CustInfo {
|
|||
// return this.costCenterId;
|
||||
// }
|
||||
|
||||
public Long getPlaceId() {
|
||||
return this.placeId;
|
||||
}
|
||||
|
||||
public String getPlaceFullName() {
|
||||
return this.placeFullName;
|
||||
}
|
||||
// public Long getPlaceId() {
|
||||
// return this.placeId;
|
||||
// }
|
||||
//
|
||||
// public String getPlaceFullName() {
|
||||
// return this.placeFullName;
|
||||
// }
|
||||
|
||||
public Integer getPsnType() {
|
||||
return this.psnType;
|
||||
|
|
@ -523,10 +513,10 @@ public class CustInfo {
|
|||
return this;
|
||||
}
|
||||
|
||||
public CustInfo setCustLimitId(final Integer custLimitId) {
|
||||
this.custLimitId = custLimitId;
|
||||
return this;
|
||||
}
|
||||
// public CustInfo setCustLimitId(final Integer custLimitId) {
|
||||
// this.custLimitId = custLimitId;
|
||||
// return this;
|
||||
// }
|
||||
|
||||
// public CustInfo setCustThirdId(final String custThirdId) {
|
||||
// this.custThirdId = custThirdId;
|
||||
|
|
@ -608,15 +598,15 @@ public class CustInfo {
|
|||
// return this;
|
||||
// }
|
||||
|
||||
public CustInfo setPlaceId(final Long placeId) {
|
||||
this.placeId = placeId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustInfo setPlaceFullName(final String placeFullName) {
|
||||
this.placeFullName = placeFullName;
|
||||
return this;
|
||||
}
|
||||
// public CustInfo setPlaceId(final Long placeId) {
|
||||
// this.placeId = placeId;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public CustInfo setPlaceFullName(final String placeFullName) {
|
||||
// this.placeFullName = placeFullName;
|
||||
// return this;
|
||||
// }
|
||||
|
||||
public CustInfo setPsnType(final Integer psnType) {
|
||||
this.psnType = psnType;
|
||||
|
|
|
|||
|
|
@ -200,13 +200,9 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
|
|||
)
|
||||
public void addCustInfo(CustInfoModel infoModel) {
|
||||
this.custInfoBurialPointBusiness.willAddOrUpdateCust(infoModel);
|
||||
//infoModel.setCustId(Id.next());
|
||||
//this.custInfoCheckService.checkCustInfoOnlyAndSetRedundantData(infoModel);
|
||||
CustInfo custInfo = new CustInfo();
|
||||
BeanUtil.copyProperties(infoModel, custInfo, new String[0]);
|
||||
custInfo.setCustLimitId(CustomerUtil.getUsableCustLimitId());
|
||||
CustomerCacheUtil.deleteCustomerNumBelongOrgMapCache();
|
||||
this.unbindPlace(infoModel.getPlaceId());
|
||||
this.custDiningPlaceService.save(custInfo.getCustId(), infoModel.getDiningPlace());
|
||||
Long accId = null;
|
||||
if (ObjectUtil.isNull(infoModel.getIsCreateAcc()) || BooleanUtil.isTrue(infoModel.getIsCreateAcc())) {
|
||||
|
|
@ -219,13 +215,6 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
|
|||
this.custInfoBurialPointBusiness.willAddOrUpdateCustAfter(infoModel, true);
|
||||
}
|
||||
|
||||
protected void unbindPlace(Long placeId) {
|
||||
if (!ObjectUtil.isNull(placeId) && !CustConstant.DATA_DEFAULT_LONG.equals(placeId)) {
|
||||
((CustInfoMapper)this.baseMapper).update((CustInfo) null, (Wrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(CustInfo.class)
|
||||
.eq(CustInfo::getPlaceId, placeId).set(CustInfo::getPlaceId, CustConstant.DATA_DEFAULT_LONG)));
|
||||
}
|
||||
}
|
||||
|
||||
protected void addCustAccTemp(CustInfo custInfo) {
|
||||
CustAccTemp custAccTemp = (CustAccTemp)LeBeanUtil.copyCreateProperties(custInfo, CustAccTemp.class);
|
||||
custAccTemp.setId((Long)null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue