ky 6 years ago
parent fa4150b6a2
commit 8b8abaaa6f

@ -1,5 +1,6 @@
package com.gszc.entity; package com.gszc.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -126,7 +127,9 @@ logout 已注销
*/ */
@ApiModelProperty(value = "跟单员id") @ApiModelProperty(value = "跟单员id")
private String copycatId; private String copycatId;
@ApiModelProperty(hidden = true)
@TableField(exist = false)
private String copycatName;
/** /**
* *
*/ */

@ -55,6 +55,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
@Autowired @Autowired
InvoiceHeaderMapper invoiceHeaderMapper; InvoiceHeaderMapper invoiceHeaderMapper;
@Autowired
PcUserServiceImpl pcUserService;
public void customRegister(Custom custom,List<CustomSupport> customSupports){ public void customRegister(Custom custom,List<CustomSupport> customSupports){
String id = Uuid8Utils.generateShortUUID(); String id = Uuid8Utils.generateShortUUID();
custom.setId(id); custom.setId(id);
@ -135,6 +138,11 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable")); Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable"));
List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "disable")); List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "disable"));
for(Custom custom:customs){
String copycatId = custom.getCopycatId();
PcUser pcUser = pcUserService.pcUserDetail(copycatId);
custom.setCopycatName(pcUser.getName());
}
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count); jsonObject.put("count",count);
jsonObject.put("customs",customs); jsonObject.put("customs",customs);
@ -151,6 +159,11 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable")); Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable"));
List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable")); List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable"));
for(Custom custom:customs){
String copycatId = custom.getCopycatId();
PcUser pcUser = pcUserService.pcUserDetail(copycatId);
custom.setCopycatName(pcUser.getName());
}
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count); jsonObject.put("count",count);
jsonObject.put("customs",customs); jsonObject.put("customs",customs);

Loading…
Cancel
Save