| | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | bizUser.setUserIsAuthorize(AppConstance.IS_NOT_AUTHORIZE); |
| | | bizUser.setCreateBy(AppConstance.USER_TYPE_ADMIN); |
| | | bizUser.setUpdateBy(AppConstance.USER_TYPE_ADMIN); |
| | | bizUser.setUserId(UUIDUtil.getRandomID()); |
| | | return bizUserDao.insert(bizUser); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public int remove(List<String> list){ |
| | | |
| | | public int remove(List<Long> list){ |
| | | |
| | | return bizUserDao.deleteByIds(list); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int removeById(String userId){ |
| | | public int removeById(Long userId){ |
| | | |
| | | return bizUserDao.deleteById(userId); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BizUser findById(String userId){ |
| | | public BizUser findById(Long userId){ |
| | | |
| | | return bizUserDao.selectById(userId); |
| | | |
| | |
| | | * @param invitationId |
| | | */ |
| | | @Override |
| | | public int setToBeAnSalesman(String openId,String invitationId) { |
| | | public int setToBeAnSalesman(String openId,String invitationId,long gradeId) { |
| | | BizUser bizUser=bizUserDao.findByOpenId(openId); |
| | | bizUser.setIsSales(BizUser.IS_SALES); |
| | | bizUser.setParentOpenId(invitationId); |
| | | bizUser.setBindingParentTime(new Date()); |
| | | bizUser.setSalesmanGrade(gradeId); |
| | | return bizUserDao.updateByModel(bizUser); |
| | | } |
| | | } |