ky 6 years ago
parent fa4150b6a2
commit 8b8abaaa6f

@ -1,5 +1,6 @@
package com.gszc.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -126,7 +127,9 @@ logout 已注销
*/
@ApiModelProperty(value = "跟单员id")
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
InvoiceHeaderMapper invoiceHeaderMapper;
@Autowired
PcUserServiceImpl pcUserService;
public void customRegister(Custom custom,List<CustomSupport> customSupports){
String id = Uuid8Utils.generateShortUUID();
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"));
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.put("count",count);
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"));
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.put("count",count);
jsonObject.put("customs",customs);

Loading…
Cancel
Save