修改了用户对应分类id

This commit is contained in:
chenze 2024-08-15 16:24:13 +08:00
parent 7bb721638c
commit 2958b009c4
7 changed files with 24 additions and 5 deletions

View File

@ -183,8 +183,8 @@ public class RepairDeviceTypeController extends BaseController {
*/
@RequiresPermissions("RepairDeviceType:type:view")
@GetMapping("selectUserListByType")
public R selectUserListByType() {
return R.data(customerStaffService.selectUserListByType());
public R selectUserListByType(String phone) {
return R.data(customerStaffService.selectUserListByType(phone));
}
/**

View File

@ -90,7 +90,7 @@ public interface IIcsCustomerStaffService extends IService<IcsCustomerStaff> {
IcsCustomerStaff selectUserByMobile(String phone);
List<IcsCustomerStaff> selectUserListByType();
List<IcsCustomerStaff> selectUserListByType(String phone);

View File

@ -65,4 +65,5 @@ public interface IRepairRelationalService extends IService<RepairRelational> {
List<RepairRelational> selectWorkerIdByTypeId(Long typeId);
Long selectByUserId(Long id);
}

View File

@ -300,10 +300,10 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
}
@Override
public List<IcsCustomerStaff> selectUserListByType() {
public List<IcsCustomerStaff> selectUserListByType(String phone) {
QueryWrapper<IcsCustomerStaff> wrapper = new QueryWrapper<>();
wrapper.like(phone != null,"mobile",phone);
return icsCustomerStaffMapper.selectList(wrapper);
}

View File

@ -114,4 +114,14 @@ public class RepairRelationalServiceImpl extends ServiceImpl<RepairRelationalMap
wrapper.eq("kind",3);
return repairRelationalMapper.selectList(wrapper);
}
@Override
public Long selectByUserId(Long id) {
QueryWrapper<RepairRelational> wrapper = new QueryWrapper<>();
wrapper.eq("user_id",id);
wrapper.eq("kind",1);
RepairRelational repairRelational = repairRelationalMapper.selectOne(wrapper);
return repairRelational.getTypeId();
}
}

View File

@ -112,5 +112,7 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
@TableField(exist = false)
private Integer num;
@TableField(exist = false)
private Long typeId;
}

View File

@ -12,6 +12,7 @@ import com.ics.admin.domain.meeting.*;
import com.ics.admin.service.ICustomerService;
import com.ics.admin.service.IIcsCustomerStaffService;
import com.ics.admin.service.IParkService;
import com.ics.admin.service.IRepairRelationalService;
import com.ics.admin.service.meeting.*;
import com.ics.common.constant.Constants;
import com.ics.common.core.controller.BaseController;
@ -85,6 +86,9 @@ public class WxLoginAPIController extends BaseController {
@Autowired
private IStaffOpenService staffOpenService;
@Autowired
private IRepairRelationalService repairRelationalService;
String smallWxAccessTokenKey = "smallWxAccessToken";
String smallWxUserPassword = "123456";
@ -388,6 +392,8 @@ public class WxLoginAPIController extends BaseController {
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectIcsCustomerStaffById(userId);
if (null != customerStaff) {
if (customerStaff.getDataType().equals("3")) customerStaff.setTypeId(repairRelationalService.selectByUserId(customerStaff.getId()));
StaffCustomer staffCustomer = new StaffCustomer();
staffCustomer.setStaffId(userId);
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffId(userId);