| | |
| | | import com.consum.base.pojo.BaseCategoryParam; |
| | | import com.consum.base.util.IdUtil; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/23 |
| | | */ |
| | | // public int add(BaseCategoryParam param, S_user_core currentUser) { |
| | | public int add(BaseCategoryParam param) { |
| | | public int add(BaseCategoryParam param, S_user_core currentUser) { |
| | | BaseCategory baseCategory = new BaseCategory(); |
| | | BeanUtils.copyProperties(param, baseCategory); |
| | | baseCategory.setId(IdUtil.generateId()); |
| | |
| | | baseCategory.setLevels(Constants.LEVELS_THREE); |
| | | } |
| | | } |
| | | //TODO 创建人id和创建人姓名 |
| | | // baseCategory.setCreateUserId(currentUser.getId()); |
| | | // baseCategory.setCreateUserName(currentUser.getUser_name()); |
| | | //创建人id和创建人姓名 |
| | | baseCategory.setCreateUserId(currentUser.getId()); |
| | | baseCategory.setCreateUserName(currentUser.getUser_name()); |
| | | //创建时间 |
| | | baseCategory.setCreateTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | |
| | |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/23 |
| | | */ |
| | | public int updateById(BaseCategory baseCategory) { |
| | | baseCategory.setStates(Constants.CATEGORY_DELETED); |
| | | public int updateById(BaseCategory baseCategory, S_user_core currentUser) { |
| | | baseCategory.setStates(Constants.STATES_DELETED); |
| | | //删除时间 |
| | | baseCategory.setDTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | //TODO 删除人id和删除人姓名 |
| | | //删除人id和删除人姓名 |
| | | baseCategory.setDUserId(currentUser.getId()); |
| | | baseCategory.setDUserName(currentUser.getUser_name()); |
| | | return this.update(baseCategory); |
| | | } |
| | | |
| | | /** |
| | | * 根据节点id查询节点详情 |
| | | * @author 卢庆阳 |
| | | * @date 2023/9/26 |
| | | * @Date 2023/10/23 |
| | | */ |
| | | public BaseCategory getById(Long id) { |
| | | return this.get(new BaseCategory(id)); |