Commit e4e8d6fb by 杨卫

Merge remote-tracking branch 'origin/v5.6.0' into v5.6.0

2 parents 1eaaea5e 196b776c
package cn.com.glsx.dj.strategy.controller;
import cn.com.glsx.dj.smartcarlife.dto.StaffInfoDTO;
import cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote;
import cn.com.glsx.dj.strategy.request.StrategyStaffRequest;
import cn.com.glsx.dj.strategy.uitl.CommonUtil;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
......@@ -9,7 +10,6 @@ import cn.com.glsx.framework.core.util.RpcAssert;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.request.MerchantRoleRequest;
import cn.com.glsx.merchants.model.request.MerchantStaffRequest;
import cn.com.glsx.merchants.model.request.StaffBatchRequest;
import cn.com.glsx.merchants.model.request.wechatbinding.MerchantStaffListRequest;
import cn.com.glsx.merchants.model.response.MerchantBaseInfoResponse;
import cn.com.glsx.merchants.model.response.MerchantRoleResponse;
......@@ -46,8 +46,11 @@ public class MerchantStaffController {
@Autowired
private MerchantRoleRemote merchantRoleRemote;
@Autowired
private StaffInfoRemote staffInfoRemote;
@ApiOperation("添加员工")
@ServiceMethod(method = "dj.api.strategy.merchant.staff.add")
@ServiceMethod(method = "dj.api.strategy.merchant.staff.add", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> addMerchantStaff(StrategyStaffRequest request) {
try {
checkStaffExist(request);
......@@ -124,14 +127,11 @@ public class MerchantStaffController {
}
@ApiOperation("禁用员工")
@ServiceMethod(method = "dj.api.strategy.merchant.staff.disable")
@ServiceMethod(method = "dj.api.strategy.merchant.staff.disable", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> disableMerchantStaff(StrategyStaffRequest request) {
try {
StaffBatchRequest staffBatchRequest = new StaffBatchRequest();
staffBatchRequest.setStaffUuid(request.getStaffUuid());
staffBatchRequest.setStatus(2);
log.info("禁用员工:{}", staffBatchRequest);
RpcResponse<Boolean> res = merchantStaffRemote.updateStaffStatusByPhone(staffBatchRequest);
StaffInfoDTO req = StaffInfoDTO.builder().staffUuid(request.getStaffUuid()).build();
RpcResponse<Boolean> res = staffInfoRemote.updateStaffStatus(req);
if (res.isFailed()) {
return RopResponse.error(res);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!