'提交代码'

dev-discount
199901012 4 years ago
parent 3ea063d118
commit 8988856570
  1. 57
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  2. 117
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantController.java
  3. 7
      hai-service/src/main/java/com/hai/service/HighCouponService.java
  4. 17
      hai-service/src/main/java/com/hai/service/HighMerchantService.java
  5. 50
      hai-service/src/main/java/com/hai/service/SecUserService.java
  6. 21
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java
  7. 61
      hai-service/src/main/java/com/hai/service/impl/HighMerchantServiceImpl.java
  8. 1
      hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java
  9. 42
      hai-service/src/main/java/com/hai/service/impl/SecUserServiceImpl.java

@ -108,4 +108,61 @@ public class HighCouponController {
} }
} }
@RequestMapping(value="/updateCoupon",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改卡卷")
public ResponseData updateCoupon(@RequestBody HighCouponModel highCoupon, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (highCoupon.getId() == null
|| highCoupon.getMerchantId() == null
|| StringUtils.isNotBlank(highCoupon.getCouponKey())
|| StringUtils.isNotBlank(highCoupon.getCouponName())
|| StringUtils.isNotBlank(highCoupon.getCouponValue())
|| StringUtils.isNotBlank(highCoupon.getCouponImg())
|| highCoupon.getIsPresent() == null
|| highCoupon.getCouponPrice() == null) {
log.error("HighCouponController -> updateCoupon() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 是否赠送卡卷
if (highCoupon.getIsPresent() == true) {
if (highCoupon.getHandselCouponList() == null || highCoupon.getHandselCouponList().size() == 0) {
log.error("HighCouponController -> updateCoupon() error!","请选择赠送卡卷名单");
throw ErrorHelp.genException(SysCode.System, ErrorCode.SELECT_HANDSEL_COUPON_ERROR, "");
}
for (HighCouponHandsel handsel : highCoupon.getHandselCouponList()) {
// 如果没有id 就是需要增加的
if (handsel.getId() == null) {
handsel.setCreateTime(new Date());
handsel.setStatus(1); // 状态 0:删除 1:正常
handsel.setOperatorId(userInfoModel.getSecUser().getId());
handsel.setOperatorName(userInfoModel.getSecUser().getUserName());
}
}
}
// 查询商户
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getCompanyId());
if (merchant == null) {
log.error("HighCouponController -> updateCoupon() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
}
highCoupon.setCompanyId(merchant.getCompanyId());
highCoupon.setOperatorId(userInfoModel.getSecUser().getId());
highCoupon.setOperatorName(userInfoModel.getSecUser().getUserName());
highCoupon.setUpdateTime(new Date());
highCouponService.updateCoupon(highCoupon);
return ResponseMsgUtil.success(highCoupon);
} catch (Exception e) {
log.error("HighCouponController -> updateCoupon() error!",e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -57,10 +57,10 @@ public class HighMerchantController {
@Resource @Resource
private SecUserService secUserService; private SecUserService secUserService;
@RequestMapping(value="/editMerchant",method = RequestMethod.POST) @RequestMapping(value="/insertMerchant",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "编辑商户") @ApiOperation(value = "增加商户")
public ResponseData editMerchant(@RequestBody HighMerchantModel highMerchant, HttpServletRequest request) { public ResponseData insertMerchant(@RequestBody HighMerchantModel highMerchant, HttpServletRequest request) {
try { try {
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
@ -69,49 +69,93 @@ public class HighMerchantController {
|| StringUtils.isBlank(highMerchant.getMerchantName()) || StringUtils.isBlank(highMerchant.getMerchantName())
|| StringUtils.isBlank(highMerchant.getTelephone()) || StringUtils.isBlank(highMerchant.getTelephone())
|| StringUtils.isBlank(highMerchant.getAddress()) || StringUtils.isBlank(highMerchant.getAddress())
|| StringUtils.isBlank(highMerchant.getSecUser().getPassword())
|| StringUtils.isBlank(highMerchant.getSecUser().getTelephone())
) { ) {
log.error("HighMerchantController -> editMerchant() error!","参数错误"); log.error("HighMerchantController -> insertMerchant() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
// id为空 就是增加商户,需要校验账号是否填写 // 校验账户手机号
if (highMerchant.getId() == null) { if (!MemberValidateUtil.validatePhone(highMerchant.getSecUser().getTelephone())) {
if (StringUtils.isBlank(highMerchant.getSecUser().getPassword()) || StringUtils.isBlank(highMerchant.getSecUser().getTelephone())) { log.error("BsStudentController --> insertMerchant() error!", "请输入正确的电话号码");
log.error("HighMerchantController -> editMerchant() error!","参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR, "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 校验账户手机号
if (!MemberValidateUtil.validatePhone(highMerchant.getSecUser().getTelephone())) {
log.error("BsStudentController --> addStudent() error!", "请输入正确的电话号码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR, "");
}
// 校验账号手机号是否存在
if (secUserService.findByPhone(highMerchant.getSecUser().getTelephone()) != null) {
log.error("BsStudentController --> addStudent() error!", "电话号码已被使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_EXISTED, "");
}
highMerchant.setStatus(1); // 状态:0:不可用,1:可用
highMerchant.setCreateTime(new Date());
highMerchant.setUpdateTime(new Date());
} else {
if (highMerchantService.getMerchantById(highMerchant.getId()) == null) {
log.error("HighMerchantController -> editMerchant() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
}
highMerchant.setUpdateTime(new Date());
} }
// 校验账号手机号是否存在
if (secUserService.findByPhone(highMerchant.getSecUser().getTelephone()) != null) {
log.error("BsStudentController --> insertMerchant() error!", "电话号码已被使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_EXISTED, "");
}
highMerchant.setStatus(1); // 状态:0:不可用,1:可用
highMerchant.setCreateTime(new Date());
highMerchant.setUpdateTime(new Date());
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); highMerchant.setOperatorId(userInfoModel.getSecUser().getId());
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName());
highMerchantService.editMerchant(highMerchant); highMerchantService.insertMerchant(highMerchant);
return ResponseMsgUtil.success(highMerchant); return ResponseMsgUtil.success(highMerchant);
} catch (Exception e) { } catch (Exception e) {
log.error("HighMerchantController -> editMerchant() error!",e); log.error("HighMerchantController -> insertMerchant() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/updateMerchant",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改商户")
public ResponseData updateMerchant(@RequestBody HighMerchantModel highMerchant, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (highMerchant.getId() == null
|| highMerchant.getCompanyId() == null
|| StringUtils.isBlank(highMerchant.getMerchantKey())
|| StringUtils.isBlank(highMerchant.getMerchantName())
|| StringUtils.isBlank(highMerchant.getTelephone())
|| StringUtils.isBlank(highMerchant.getAddress())
|| StringUtils.isBlank(highMerchant.getTelephone())
) {
log.error("HighMerchantController -> updateMerchant() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 查询商户
HighMerchantModel merchant = highMerchantService.getMerchantById(highMerchant.getId());
if (merchant == null) {
log.error("HighMerchantController -> updateMerchant() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
}
// 商户主账号
if (merchant.getSecUser() == null) {
log.error("HighMerchantController -> updateMerchant() error!","主账号异常");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPANY_ADMIN_USER_ERROR, "");
}
// 校验账户手机号
if (MemberValidateUtil.validatePhone(highMerchant.getSecUser().getTelephone())) {
log.error("BsStudentController --> updateMerchant() error!", "请输入正确的电话号码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR, "");
}
// 校验账号手机号是否存在
if (!merchant.getSecUser().getTelephone().equals(highMerchant.getSecUser().getTelephone())
&& secUserService.findByPhone(highMerchant.getSecUser().getTelephone()) != null) {
log.error("BsStudentController --> updateMerchant() error!", "电话号码已被使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_EXISTED, "");
}
highMerchant.setUpdateTime(new Date());
highMerchant.setOperatorId(userInfoModel.getSecUser().getId());
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName());
highMerchantService.updateMerchant(highMerchant);
return ResponseMsgUtil.success(highMerchant);
} catch (Exception e) {
log.error("HighMerchantController -> updateMerchant() error!",e);
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);
} }
} }
@ -123,6 +167,7 @@ public class HighMerchantController {
try { try {
return ResponseMsgUtil.success(highMerchantService.getMerchantById(id)); return ResponseMsgUtil.success(highMerchantService.getMerchantById(id));
} catch (Exception e) { } catch (Exception e) {
log.error("HighMerchantController -> getMerchantById() error!",e); log.error("HighMerchantController -> getMerchantById() error!",e);
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);
@ -135,6 +180,7 @@ public class HighMerchantController {
public ResponseData getMerchantList(@RequestParam(name = "merchantKey", required = false) String merchantKey, public ResponseData getMerchantList(@RequestParam(name = "merchantKey", required = false) String merchantKey,
@RequestParam(name = "merchantName", required = false) String merchantName, @RequestParam(name = "merchantName", required = false) String merchantName,
@RequestParam(name = "telephone", required = false) String telephone, @RequestParam(name = "telephone", required = false) String telephone,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize, @RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) { HttpServletRequest request) {
@ -150,6 +196,7 @@ public class HighMerchantController {
map.put("merchantKey", merchantKey); map.put("merchantKey", merchantKey);
map.put("merchantName", merchantName); map.put("merchantName", merchantName);
map.put("telephone", telephone); map.put("telephone", telephone);
map.put("status", status);
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highMerchantService.getMerchantList(map))); return ResponseMsgUtil.success(new PageInfo<>(highMerchantService.getMerchantList(map)));

@ -17,4 +17,11 @@ public interface HighCouponService {
**/ **/
void insertCoupon(HighCouponModel highCouponModel); void insertCoupon(HighCouponModel highCouponModel);
/**
* @Author 胡锐
* @Description 修改
* @Date 2021/3/12 20:41
**/
void updateCoupon(HighCouponModel highCouponModel);
} }

@ -12,16 +12,25 @@ import java.util.Map;
public interface HighMerchantService { public interface HighMerchantService {
/** /**
* 编辑 * @Author 胡锐
*/ * @Description 增加
void editMerchant(HighMerchantModel highMerchant) throws Exception; * @Date 2021/3/12 21:24
**/
void insertMerchant(HighMerchantModel highMerchant) throws Exception;
/**
* @Author 胡锐
* @Description 修改
* @Date 2021/3/12 21:24
**/
void updateMerchant(HighMerchantModel highMerchant) throws Exception;
/** /**
* 根据id查询 * 根据id查询
* @param id * @param id
* @return * @return
*/ */
HighMerchant getMerchantById(Long id); HighMerchantModel getMerchantById(Long id);
/** /**
* 查询列表 * 查询列表

@ -133,52 +133,12 @@ public interface SecUserService {
void modifyUser(SecUser user); void modifyUser(SecUser user);
/** /**
* * @Author 胡锐
* @Title: findAgencyUser * @Description 查询主账号
* @Description: 查询机构用户 * @Date 2021/3/12 21:05
* @author: 杜江 **/
* @Date: 2020/7/28 16:05 SecUser getMainAccount(Integer objectType,Long objectId);
* @param: [agencyId]
* @return: com.shinwoten.train.entity.SecUser
* @throws
*/
SecUser findAgencyUser(Long agencyId);
/**
*
* @Title: findAgencyWorker
* @Description: 查询机构工作人员
* @author: 袁野
* @Date: 2020/10/08 16:05
* @param: [workerId]
* @return: com.shinwoten.train.entity.SecUser
* @throws
*/
SecUser findAgencyWorker(Long workerId);
/**
*
* @Title: findTeacherUser
* @Description: 查询教师账号
* @author: 杜江
* @Date: 2020/7/30 14:48
* @param: [teacherId]
* @return: com.shinwoten.train.entity.SecUser
* @throws
*/
SecUser findTeacherUser(Long teacherId);
/**
*
* @Title: findTeacherUser
* @Description: 查询工作人员账号
* @author: 袁野
* @Date: 2020/09/29 14:48
* @param: [workId]
* @return: com.shinwoten.train.entity.SecUser
* @throws
*/
SecUser findWorkerUser(Long workId);
/** /**
* *
* @Title: findUserList * @Title: findUserList

@ -37,8 +37,29 @@ public class HighCouponServiceImpl implements HighCouponService {
if (highCouponModel.getHandselCouponList() != null && highCouponModel.getHandselCouponList().size() > 0) { if (highCouponModel.getHandselCouponList() != null && highCouponModel.getHandselCouponList().size() > 0) {
for (HighCouponHandselModel handsel : highCouponModel.getHandselCouponList()) { for (HighCouponHandselModel handsel : highCouponModel.getHandselCouponList()) {
handsel.setCouponId(highCouponModel.getId()); handsel.setCouponId(highCouponModel.getId());
highCouponHandselMapper.insert(handsel);
} }
} }
}
@Override
@Transactional
public void updateCoupon(HighCouponModel highCouponModel) {
highCouponMapper.updateByPrimaryKey(highCouponModel);
// 赠送卡卷
if (highCouponModel.getHandselCouponList() != null && highCouponModel.getHandselCouponList().size() > 0) {
for (HighCouponHandselModel handsel : highCouponModel.getHandselCouponList()) {
// 状态标记为删除的,进行删除操作
if (handsel.getStatus() == 0) {
highCouponHandselMapper.deleteByPrimaryKey(handsel.getId());
}
// id为空的,进行增加操作
if (handsel.getId() == null) {
handsel.setCouponId(highCouponModel.getId());
highCouponHandselMapper.insert(handsel);
}
}
}
} }
} }

@ -1,5 +1,8 @@
package com.hai.service.impl; package com.hai.service.impl;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.MD5Util; import com.hai.common.utils.MD5Util;
import com.hai.dao.HighMerchantMapper; import com.hai.dao.HighMerchantMapper;
import com.hai.entity.HighMerchant; import com.hai.entity.HighMerchant;
@ -10,6 +13,7 @@ import com.hai.service.HighMerchantService;
import com.hai.service.SecUserService; import com.hai.service.SecUserService;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -29,29 +33,48 @@ public class HighMerchantServiceImpl implements HighMerchantService {
@Override @Override
@Transactional @Transactional
public void editMerchant(HighMerchantModel highMerchant) throws Exception { public void insertMerchant(HighMerchantModel highMerchant) throws Exception {
if (highMerchant.getId() == null) { highMerchantMapper.insert(highMerchant);
highMerchantMapper.insert(highMerchant);
highMerchant.getSecUser().setUserName(highMerchant.getMerchantName()); highMerchant.getSecUser().setUserName(highMerchant.getMerchantName());
highMerchant.getSecUser().setLoginName(highMerchant.getSecUser().getTelephone()); highMerchant.getSecUser().setLoginName(highMerchant.getSecUser().getTelephone());
highMerchant.getSecUser().setPassword(MD5Util.encode(highMerchant.getSecUser().getPassword().getBytes()));
highMerchant.getSecUser().setAdminFlag(1);
highMerchant.getSecUser().setStatus(1);
highMerchant.getSecUser().setRoleId(2L);
highMerchant.getSecUser().setObjectType(2);
highMerchant.getSecUser().setObjectId(highMerchant.getId());
highMerchant.getSecUser().setCreateTime(new Date());
highMerchant.getSecUser().setUpdateTime(new Date());
secUserService.addUser(highMerchant.getSecUser());
}
@Override
@Transactional
public void updateMerchant(HighMerchantModel highMerchant) throws Exception {
highMerchantMapper.updateByPrimaryKey(highMerchant);
if (StringUtils.isNotBlank(highMerchant.getSecUser().getPassword())) {
highMerchant.getSecUser().setPassword(MD5Util.encode(highMerchant.getSecUser().getPassword().getBytes())); highMerchant.getSecUser().setPassword(MD5Util.encode(highMerchant.getSecUser().getPassword().getBytes()));
highMerchant.getSecUser().setStatus(1);
highMerchant.getSecUser().setRoleId(2L);
highMerchant.getSecUser().setObjectType(2);
highMerchant.getSecUser().setObjectId(highMerchant.getId());
highMerchant.getSecUser().setCreateTime(new Date());
highMerchant.getSecUser().setUpdateTime(new Date());
secUserService.addUser(highMerchant.getSecUser());
} else {
highMerchantMapper.updateByPrimaryKey(highMerchant);
} }
secUserService.updateUser(highMerchant.getSecUser());
} }
@Override @Override
public HighMerchant getMerchantById(Long id) { public HighMerchantModel getMerchantById(Long id) {
return highMerchantMapper.selectByPrimaryKey(id); HighMerchant merchant = highMerchantMapper.selectByPrimaryKey(id);
if (merchant == null) {
return null;
}
HighMerchantModel merchantModel = new HighMerchantModel();
BeanUtils.copyProperties(merchant, merchantModel);
// 查询商户主账号
SecUser mainAccount = secUserService.getMainAccount(2, merchant.getId());
if (mainAccount != null) {
merchantModel.setSecUser(mainAccount);
}
return merchantModel;
} }
@Override @Override
@ -75,6 +98,10 @@ public class HighMerchantServiceImpl implements HighMerchantService {
criteria.andTelephoneEqualTo(MapUtils.getString(map, "telephone")); criteria.andTelephoneEqualTo(MapUtils.getString(map, "telephone"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(map, "status"))) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
return highMerchantMapper.selectByExample(example); return highMerchantMapper.selectByExample(example);
} }

@ -41,6 +41,7 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
highMerchantStore.getSecUser().setUserName(highMerchantStore.getStoreName()); highMerchantStore.getSecUser().setUserName(highMerchantStore.getStoreName());
highMerchantStore.getSecUser().setLoginName(highMerchantStore.getSecUser().getTelephone()); highMerchantStore.getSecUser().setLoginName(highMerchantStore.getSecUser().getTelephone());
highMerchantStore.getSecUser().setPassword(MD5Util.encode(highMerchantStore.getSecUser().getPassword().getBytes())); highMerchantStore.getSecUser().setPassword(MD5Util.encode(highMerchantStore.getSecUser().getPassword().getBytes()));
highMerchantStore.getSecUser().setAdminFlag(1);
highMerchantStore.getSecUser().setStatus(1); highMerchantStore.getSecUser().setStatus(1);
highMerchantStore.getSecUser().setRoleId(3L); highMerchantStore.getSecUser().setRoleId(3L);
highMerchantStore.getSecUser().setObjectType(3); highMerchantStore.getSecUser().setObjectType(3);

@ -176,45 +176,13 @@ public class SecUserServiceImpl implements SecUserService {
} }
@Override @Override
public SecUser findAgencyUser(Long agencyId) { public SecUser getMainAccount(Integer objectType, Long objectId) {
SecUserExample example = new SecUserExample(); SecUserExample example = new SecUserExample();
example.createCriteria().andObjectTypeEqualTo(2).andObjectIdEqualTo(agencyId).andStatusEqualTo(1); example.createCriteria().andAdminFlagEqualTo(1).andObjectTypeEqualTo(objectType).andObjectIdEqualTo(objectId);
List<SecUser> secUsers = secUserMapper.selectByExample(example);
if (secUsers != null && secUsers.size() != 0) {
return secUsers.get(0);
}
return null;
}
@Override
public SecUser findAgencyWorker(Long workerId) {
SecUserExample example = new SecUserExample();
example.createCriteria().andObjectTypeEqualTo(4).andObjectIdEqualTo(workerId).andStatusEqualTo(1);
List<SecUser> secUsers = secUserMapper.selectByExample(example);
if (secUsers != null && secUsers.size() != 0) {
return secUsers.get(0);
}
return null;
}
@Override List<SecUser> list = secUserMapper.selectByExample(example);
public SecUser findTeacherUser(Long teacherId) { if (list != null && list.size() > 0) {
SecUserExample example = new SecUserExample(); return list.get(0);
example.createCriteria().andObjectTypeEqualTo(3).andObjectIdEqualTo(teacherId).andStatusEqualTo(1);
List<SecUser> secUsers = secUserMapper.selectByExample(example);
if (secUsers != null && secUsers.size() != 0) {
return secUsers.get(0);
}
return null;
}
@Override
public SecUser findWorkerUser(Long workId) {
SecUserExample example = new SecUserExample();
example.createCriteria().andObjectTypeEqualTo(4).andObjectIdEqualTo(workId).andStatusEqualTo(1);
List<SecUser> secUsers = secUserMapper.selectByExample(example);
if (secUsers != null && secUsers.size() != 0) {
return secUsers.get(0);
} }
return null; return null;
} }

Loading…
Cancel
Save