|
|
@ -56,6 +56,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
MiniUserServiceImpl miniUserService;
|
|
|
|
MiniUserServiceImpl miniUserService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
ParkMapper parkMapper;
|
|
|
|
|
|
|
|
|
|
|
|
public void customRegister(Custom custom,List<CustomSupport> customSupports){
|
|
|
|
public void customRegister(Custom custom,List<CustomSupport> customSupports){
|
|
|
|
String id = String.format("%06d",new Random().nextInt(999999)+1);
|
|
|
|
String id = String.format("%06d",new Random().nextInt(999999)+1);
|
|
|
|
Custom isHave = customMapper.selectById(id);
|
|
|
|
Custom isHave = customMapper.selectById(id);
|
|
|
@ -133,6 +136,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
Custom custom = customMapper.selectById(customId);
|
|
|
|
Custom custom = customMapper.selectById(customId);
|
|
|
|
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", customId));
|
|
|
|
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", customId));
|
|
|
|
jsonObject.put("custom",custom);
|
|
|
|
jsonObject.put("custom",custom);
|
|
|
|
|
|
|
|
String parkId = custom.getPark();
|
|
|
|
|
|
|
|
Park park = parkMapper.selectById(parkId);
|
|
|
|
|
|
|
|
custom.setParkName(park.getName());
|
|
|
|
jsonObject.put("customSupports",customSupports);
|
|
|
|
jsonObject.put("customSupports",customSupports);
|
|
|
|
|
|
|
|
|
|
|
|
//年度
|
|
|
|
//年度
|
|
|
@ -214,16 +220,20 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
* @param pageSize
|
|
|
|
* @param pageSize
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public JSONObject pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId){
|
|
|
|
public JSONObject pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId,String param){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Wrapper<Custom> customWrapper = new EntityWrapper<Custom>().eq("status_code", "enable");
|
|
|
|
|
|
|
|
if(!param.equals("")){
|
|
|
|
|
|
|
|
customWrapper.like("company_name",param).like("link_man",param).like("link_telephone",param);
|
|
|
|
|
|
|
|
}
|
|
|
|
Integer count = null;
|
|
|
|
Integer count = null;
|
|
|
|
List<Custom> customs;
|
|
|
|
List<Custom> customs;
|
|
|
|
if(null==copycatId){
|
|
|
|
if(null==copycatId){
|
|
|
|
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable"));
|
|
|
|
count = customMapper.selectCount(customWrapper);
|
|
|
|
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable").orderBy("create_date", false));
|
|
|
|
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.orderBy("create_date", false));
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable").eq("copycat_id",copycatId));
|
|
|
|
count = customMapper.selectCount(customWrapper.eq("copycat_id",copycatId));
|
|
|
|
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable").eq("copycat_id",copycatId).orderBy("create_date", false));
|
|
|
|
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.eq("copycat_id",copycatId).orderBy("create_date", false));
|
|
|
|
}for(Custom custom:customs){
|
|
|
|
}for(Custom custom:customs){
|
|
|
|
String copycat = custom.getCopycatId();
|
|
|
|
String copycat = custom.getCopycatId();
|
|
|
|
PcUser pcUser = pcUserService.pcUserDetail(copycat);
|
|
|
|
PcUser pcUser = pcUserService.pcUserDetail(copycat);
|
|
|
|