|
@@ -17,10 +17,7 @@ import com.huimv.receive.entity.pojo.UserPagePojo;
|
|
import com.huimv.receive.entity.vo.UserAccountVo;
|
|
import com.huimv.receive.entity.vo.UserAccountVo;
|
|
import com.huimv.receive.entity.vo.UserAgeAndGender;
|
|
import com.huimv.receive.entity.vo.UserAgeAndGender;
|
|
import com.huimv.receive.entity.vo.UserJob;
|
|
import com.huimv.receive.entity.vo.UserJob;
|
|
-import com.huimv.receive.mapper.BaseLocationMapper;
|
|
|
|
-import com.huimv.receive.mapper.FarmMapper;
|
|
|
|
-import com.huimv.receive.mapper.SysAccountMultilevelMapper;
|
|
|
|
-import com.huimv.receive.mapper.SysUserMapper;
|
|
|
|
|
|
+import com.huimv.receive.mapper.*;
|
|
import com.huimv.receive.service.IBaseLocationService;
|
|
import com.huimv.receive.service.IBaseLocationService;
|
|
import com.huimv.receive.service.IFarmService;
|
|
import com.huimv.receive.service.IFarmService;
|
|
import com.huimv.receive.service.ISysUserService;
|
|
import com.huimv.receive.service.ISysUserService;
|
|
@@ -61,6 +58,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
@Autowired
|
|
@Autowired
|
|
private UploadImage uploadImage;
|
|
private UploadImage uploadImage;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExistMapper existMapper;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Result pageAll(UserPagePojo userPagePojo) {
|
|
public Result pageAll(UserPagePojo userPagePojo) {
|
|
Integer pageNum = userPagePojo.getPageNum();
|
|
Integer pageNum = userPagePojo.getPageNum();
|
|
@@ -98,8 +98,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
String farmId = (String)map.get("farmId");
|
|
String farmId = (String)map.get("farmId");
|
|
if (checkFarm(farmId))
|
|
if (checkFarm(farmId))
|
|
return new Result(10001,"牧场信息为空",false);
|
|
return new Result(10001,"牧场信息为空",false);
|
|
- return new Result(ResultCode.SUCCESS,baseLocationMapper.selectList(new QueryWrapper<BaseLocation>().eq("farm_id",farmId).groupBy("location_type").orderByAsc("location_type")));
|
|
|
|
- }
|
|
|
|
|
|
+ Exist exist = existMapper.selectOne(new QueryWrapper<Exist>().eq("farm_id", farmId));
|
|
|
|
+ if (exist.getExist() == 0){
|
|
|
|
+ return new Result(ResultCode.SUCCESS,baseLocationMapper.selectList(new QueryWrapper<BaseLocation>().groupBy("location_type").orderByAsc("location_type")));
|
|
|
|
+ }else {
|
|
|
|
+ return new Result(ResultCode.SUCCESS,baseLocationMapper.selectList(new QueryWrapper<BaseLocation>().notIn("location_type",3,7,9).groupBy("location_type").orderByAsc("location_type")));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result pageAccount(UserPagePojo userPagePojo) {
|
|
public Result pageAccount(UserPagePojo userPagePojo) {
|