|
@@ -241,12 +241,12 @@ public class AppAgencyController {
|
|
|
@PostMapping(value = "/update/customer")
|
|
|
@ResponseBody
|
|
|
public Result updateAgencyCustomer(@RequestBody @ApiParam(name="经纪人下的客源对象",value="传入json格式",required=true)TmAgencyUserRelation agencyUserRelation) {
|
|
|
- if (null == agencyUserRelation || !StringUtils.isNoneBlank(agencyUserRelation.getUserId() ,agencyUserRelation.getAgencyUserId())) {
|
|
|
- throw new CommonBaseException(ResultCodeEnum.D017, "经纪人id和用户id都不能为空");
|
|
|
+ if (null == agencyUserRelation || null == agencyUserRelation.getId() || !StringUtils.isNoneBlank(agencyUserRelation.getAgencyUserId())) {
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D017, "经纪人id和 客户信息id 都不能为空");
|
|
|
}
|
|
|
QueryWrapper<TmAgencyUserRelation> userRelationQueryWrapper = new QueryWrapper<>();
|
|
|
- userRelationQueryWrapper.eq("agency_user_id" , agencyUserRelation.getAgencyUserId());
|
|
|
- userRelationQueryWrapper.eq("user_id" , agencyUserRelation.getUserId());
|
|
|
+// userRelationQueryWrapper.eq("agency_user_id" , agencyUserRelation.getAgencyUserId());
|
|
|
+ userRelationQueryWrapper.eq("id" , agencyUserRelation.getId());
|
|
|
userRelationQueryWrapper.last("limit 1");
|
|
|
TmAgencyUserRelation dbAgencyRelation = agencyUserRelationDao.selectOne(userRelationQueryWrapper);
|
|
|
if(null == dbAgencyRelation){
|