Commit 06c84461 by 徐高华

更新排序

parent d3a2f6e6
......@@ -32,8 +32,15 @@ public class MaterialCategoryServiceImpl implements MaterialCategoryService{
materialCategoryDTO.setCreateTime(new Date());
materialCategoryDTO.setUpdateTime(materialCategoryDTO.getCreateTime());
materialCategoryDTO.setStatusFlag(1);
materialCategoryDTO.setSortNum(this.mapper.getMaxSortNum(materialCategoryDTO.getWxEnterpriseId(),materialCategoryDTO.getCategoryParentId()) + 1);
materialCategoryDTO.setSortNum(-1);
mapper.insert(EntityUtil.changeEntityByJSON(TabHaobanMaterialCategory.class, materialCategoryDTO));
// 修改排序
List<MaterialCategoryDTO> list = this.listByParentCategory(materialCategoryDTO.getCategoryParentId()) ;
for(int i=0;i<list.size();i++) {
MaterialCategoryDTO item = list.get(i) ;
item.setSortNum(i+1);
}
this.mapper.updateSortNum(list);
}
@Override
......
......@@ -557,6 +557,10 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
private MomentResultDTO getData(String staffId , String momentId , WxEnterpriseQwDTO qwDTO) {
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ;
if(null == staff) {
logger.info("无员工={}",staffId);
return null ;
}
String wxUserId = staff.getWxUserId() ;
if(qwDTO.needOpenUserId3th()) {
wxUserId = staff.getWxOpenUseId() ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment