查询客户nc编码
This commit is contained in:
+7
@@ -50,6 +50,7 @@ import com.mhd.user.domain.roleAggregate.service.RoleMenuDomainService;
|
||||
import com.mhd.user.domain.userAggregate.entity.*;
|
||||
import com.mhd.user.domain.userAggregate.factory.UserFactory;
|
||||
import com.mhd.user.domain.userAggregate.repository.mapper.UserMapper;
|
||||
import com.mhd.user.domain.userAggregate.repository.mapper.UserShipperMapper;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.*;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserAuthInfoPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserAuthPo;
|
||||
@@ -210,6 +211,8 @@ public class UserApplicationService {
|
||||
@Qualifier("tokenService")
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
@Autowired
|
||||
private UserShipperMapper userShipperMapper;
|
||||
|
||||
/**
|
||||
* @Description 查询用户列表
|
||||
@@ -5325,4 +5328,8 @@ public class UserApplicationService {
|
||||
BeanUtils.copyProperties(customerDO, userDO);
|
||||
userDomainService.updateUser(userDO);
|
||||
}
|
||||
|
||||
public String getCustomerNcCode(Long shipperId) {
|
||||
return userShipperMapper.getCustomerNcCode(shipperId);
|
||||
}
|
||||
}
|
||||
+4
@@ -6,6 +6,7 @@ import com.mhd.user.domain.userAggregate.entity.UserShipperEntity;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserShipperDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -36,4 +37,7 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
|
||||
* @return
|
||||
*/
|
||||
int updatePushStatus(UserShipperEntity userShipper);
|
||||
|
||||
@Select("select customer_nc_code from user_shipper where user_id = #{shipperId}")
|
||||
String getCustomerNcCode(@Param("shipperId") Long shipperId);
|
||||
}
|
||||
@@ -25,8 +25,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Api(tags = "用户中台管理-托运人管理")
|
||||
@Slf4j
|
||||
@@ -268,4 +267,25 @@ public class UserShipperAPI extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "托运人管理-查询", description ="查询托运人列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询托运人列表")
|
||||
@GetMapping("/userShipperList2")
|
||||
public TableDataInfo userShipperList2(UserShipperDTO userShipperDTO) {
|
||||
//转换实体
|
||||
UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO);
|
||||
List<UserShipperPo> list = userShipperApplicationService.userShipperList(userShipperDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/getCustomerNcCodeBatch")
|
||||
public AjaxResult getCustomerNcCodeBatch(@RequestBody List<Long> shipperIdList){
|
||||
Map<Long, String> resultMap = new HashMap<>();
|
||||
if (shipperIdList != null && !shipperIdList.isEmpty()) {
|
||||
for (Long shipperId : shipperIdList) {
|
||||
String ncCode = userApplicationService.getCustomerNcCode(shipperId);
|
||||
resultMap.put(shipperId, ncCode);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(resultMap);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user