高敬炎 2 роки тому
батько
коміт
8824e8021d

+ 126 - 124
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/card/impl/CardClassifyInfoServiceImpl.java

@@ -20,143 +20,145 @@ import com.iotechn.unimall.data.mapper.CardClassifyInfoMapper;
 import com.iotechn.unimall.data.domain.CardClassifyInfo;
 import com.iotechn.unimall.admin.api.card.ICardClassifyInfoService;
 import com.iotechn.unimall.data.model.Page;
+
 import java.util.Date;
+
 import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 名片分类Service业务层处理
- * 
+ *
  * @author jlb
  * @date 2023-04-10
  */
 @Service
-public class CardClassifyInfoServiceImpl implements ICardClassifyInfoService{
-	@Autowired
-	private CardClassifyInfoMapper cardClassifyInfoMapper;
-	
-	@Override
-	public Boolean add(CardClassifyInfo cardClassifyInfo) throws ServiceException {
-		Date now = new Date();
-		cardClassifyInfo.setGmtCreate(now);
-		cardClassifyInfo.setGmtUpdate(now);
-		List<CardClassifyInfo> cardClassifyInfoList=cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
-				.eq("common_id",cardClassifyInfo.getCommonId())
-				.eq("delete_flag",0)
-				.eq("circle_name",cardClassifyInfo.getCircleName()));
-		if (cardClassifyInfoList.size()>0) {
-			throw new AppServiceException(ExceptionDefinition.CLASSIFY_REPEAT_ERROR);
-		}
-		return cardClassifyInfoMapper.insert(cardClassifyInfo)>0;
-	}
+public class CardClassifyInfoServiceImpl implements ICardClassifyInfoService {
+    @Autowired
+    private CardClassifyInfoMapper cardClassifyInfoMapper;
+
+    @Override
+    public Boolean add(CardClassifyInfo cardClassifyInfo) throws ServiceException {
+        Date now = new Date();
+        cardClassifyInfo.setGmtCreate(now);
+        cardClassifyInfo.setGmtUpdate(now);
+        List<CardClassifyInfo> cardClassifyInfoList = cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
+                .eq("common_id", cardClassifyInfo.getCommonId())
+                .eq("delete_flag", 0)
+                .eq("circle_name", cardClassifyInfo.getCircleName()));
+        if (cardClassifyInfoList.size() > 0) {
+            throw new AppServiceException(ExceptionDefinition.CLASSIFY_REPEAT_ERROR);
+        }
+        return cardClassifyInfoMapper.insert(cardClassifyInfo) > 0;
+    }
+
+    @Override
+    public Page<CardClassifyInfo> list(Long commonId, String circleName, Long topMarking, Date gmtCreate, Date gmtUpdate, Long deleteFlag, Integer page, Integer limit) throws ServiceException {
+        Wrapper<CardClassifyInfo> wrapper = new EntityWrapper<CardClassifyInfo>();
+        if (!StringUtils.isEmpty(commonId)) {
+            wrapper.eq("common_id", commonId);
+        }
+        if (!StringUtils.isEmpty(circleName)) {
+            wrapper.eq("circle_name", circleName);
+        }
+        if (!StringUtils.isEmpty(topMarking)) {
+            wrapper.eq("top_marking", topMarking);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        wrapper.eq("delete_flag", 0).orderBy("top_marking", false).orderBy("gmt_create", true);
+        List<CardClassifyInfo> list = cardClassifyInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = cardClassifyInfoMapper.selectCount(wrapper);
+        return new Page<CardClassifyInfo>(list, page, limit, count);
+    }
 
-	@Override
-	public Page<CardClassifyInfo> list(Long commonId,String circleName,Long topMarking,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
-		Wrapper<CardClassifyInfo> wrapper = new EntityWrapper<CardClassifyInfo>();
-														if (!StringUtils.isEmpty(commonId)) {
-					wrapper.eq("common_id", commonId);
-				}
-												if (!StringUtils.isEmpty(circleName)) {
-					wrapper.eq("circle_name", circleName);
-				}
-												if (!StringUtils.isEmpty(topMarking)) {
-					wrapper.eq("top_marking", topMarking);
-				}
-												if (!StringUtils.isEmpty(gmtCreate)) {
-					wrapper.eq("gmt_create", gmtCreate);
-				}
-												if (!StringUtils.isEmpty(gmtUpdate)) {
-					wrapper.eq("gmt_update", gmtUpdate);
-				}
-												if (!StringUtils.isEmpty(deleteFlag)) {
-					wrapper.eq("delete_flag", deleteFlag);
-				}
-							wrapper.eq("delete_flag", 0).orderBy("top_marking",false);
-		List<CardClassifyInfo> list = cardClassifyInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
-		Integer count = cardClassifyInfoMapper.selectCount(wrapper);
-		return new Page<CardClassifyInfo>(list, page, limit, count);
-	}
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            CardClassifyInfo tmp = cardClassifyInfoMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                tmp.setGmtUpdate(new Date());
+                cardClassifyInfoMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
 
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public Boolean delete(String id) {
-		String[] ids = String.valueOf(id).split(",");
-		for (String tt:ids) {
-			CardClassifyInfo tmp =  cardClassifyInfoMapper.selectById(Long.parseLong(tt));
-			if(tmp != null){
-				tmp.setDeleteFlag(1l);
-				tmp.setGmtUpdate(new Date());
-				cardClassifyInfoMapper.updateById(tmp);
-			}
-		}
-		return true;
-	}
+    @Override
+    public Boolean top(CardClassifyInfo cardClassifyInfo) throws ServiceException {
+        CardClassifyInfo cardClassifyInfo1 = cardClassifyInfoMapper.selectById(cardClassifyInfo.getId());
+        List<CardClassifyInfo> cardClassifyInfoList = cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
+                .eq("common_id", cardClassifyInfo1.getCommonId())
+                .eq("delete_flag", 0));
+        if (!CollectionUtils.isEmpty(cardClassifyInfoList)) {
+            for (CardClassifyInfo aa : cardClassifyInfoList) {
+                aa.setTopMarking(0l);
+                cardClassifyInfoMapper.updateById(aa);
+            }
+        }
+        cardClassifyInfo1.setTopMarking(1l);
+        cardClassifyInfo1.setGmtUpdate(new Date());
+        return cardClassifyInfoMapper.updateById(cardClassifyInfo1) > 0;
+    }
 
-	@Override
-	public Boolean top(CardClassifyInfo cardClassifyInfo) throws ServiceException {
-		CardClassifyInfo cardClassifyInfo1=cardClassifyInfoMapper.selectById(cardClassifyInfo.getId());
-		List<CardClassifyInfo> cardClassifyInfoList=cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
-				.eq("common_id",cardClassifyInfo1.getCommonId())
-				.eq("delete_flag",0));
-		if (!CollectionUtils.isEmpty(cardClassifyInfoList)) {
-			for (CardClassifyInfo aa : cardClassifyInfoList) {
-				aa.setTopMarking(0l);
-				cardClassifyInfoMapper.updateById(aa);
-			}
-		}
-		cardClassifyInfo1.setTopMarking(1l);
-		cardClassifyInfo1.setGmtUpdate(new Date());
-		return cardClassifyInfoMapper.updateById(cardClassifyInfo1)>0;
-	}
+    @Override
+    public Boolean topDefault(CardClassifyInfo cardClassifyInfo) throws ServiceException {
+        List<CardClassifyInfo> cardClassifyInfoList = cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
+                .eq("common_id", cardClassifyInfo.getCommonId())
+                .eq("delete_flag", 0));
+        if (!CollectionUtils.isEmpty(cardClassifyInfoList)) {
+            for (CardClassifyInfo aa : cardClassifyInfoList) {
+                aa.setTopMarking(0l);
+                cardClassifyInfoMapper.updateById(aa);
+            }
+        }
+        return true;
+    }
 
-	@Override
-	public Boolean topDefault(CardClassifyInfo cardClassifyInfo) throws ServiceException {
-		List<CardClassifyInfo> cardClassifyInfoList=cardClassifyInfoMapper.selectList(new EntityWrapper<CardClassifyInfo>()
-				.eq("common_id",cardClassifyInfo.getCommonId())
-				.eq("delete_flag",0));
-		if (!CollectionUtils.isEmpty(cardClassifyInfoList)) {
-			for (CardClassifyInfo aa : cardClassifyInfoList) {
-				aa.setTopMarking(0l);
-				cardClassifyInfoMapper.updateById(aa);
-			}
-		}
-		return true;
-	}
+    @Override
+    public Boolean update(CardClassifyInfo cardClassifyInfo) throws ServiceException {
+        Date now = new Date();
+        cardClassifyInfo.setGmtUpdate(now);
+        return cardClassifyInfoMapper.updateById(cardClassifyInfo) > 0;
+    }
 
-	@Override
-	public Boolean update(CardClassifyInfo cardClassifyInfo) throws ServiceException {
-		Date now = new Date();
-		cardClassifyInfo.setGmtUpdate(now);
-		return cardClassifyInfoMapper.updateById(cardClassifyInfo)>0;
-	}
+    @Override
+    public CardClassifyInfo get(Long id) throws ServiceException {
+        return cardClassifyInfoMapper.selectById(id);
+    }
 
-	@Override
-	public CardClassifyInfo get(Long id) throws ServiceException {
-		return cardClassifyInfoMapper.selectById(id);
-	}
-	
-	@Override
-	public String export(Long commonId,String circleName,Long topMarking,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
-		Wrapper<CardClassifyInfo> wrapper = new EntityWrapper<CardClassifyInfo>();
-														if (!StringUtils.isEmpty(commonId)) {
-					wrapper.eq("common_id", commonId);
-				}
-												if (!StringUtils.isEmpty(circleName)) {
-					wrapper.eq("circle_name", circleName);
-				}
-												if (!StringUtils.isEmpty(topMarking)) {
-					wrapper.eq("top_marking", topMarking);
-				}
-												if (!StringUtils.isEmpty(gmtCreate)) {
-					wrapper.eq("gmt_create", gmtCreate);
-				}
-												if (!StringUtils.isEmpty(gmtUpdate)) {
-					wrapper.eq("gmt_update", gmtUpdate);
-				}
-												if (!StringUtils.isEmpty(deleteFlag)) {
-					wrapper.eq("delete_flag", deleteFlag);
-				}
-							List<CardClassifyInfo> list = cardClassifyInfoMapper.selectList(wrapper);
-		ExcelUtil<CardClassifyInfo> util = new ExcelUtil<CardClassifyInfo>(CardClassifyInfo.class);
-		return util.exportExcel(list, "操作日志");
-	}
+    @Override
+    public String export(Long commonId, String circleName, Long topMarking, Date gmtCreate, Date gmtUpdate, Long deleteFlag, Integer page, Integer limit) throws ServiceException {
+        Wrapper<CardClassifyInfo> wrapper = new EntityWrapper<CardClassifyInfo>();
+        if (!StringUtils.isEmpty(commonId)) {
+            wrapper.eq("common_id", commonId);
+        }
+        if (!StringUtils.isEmpty(circleName)) {
+            wrapper.eq("circle_name", circleName);
+        }
+        if (!StringUtils.isEmpty(topMarking)) {
+            wrapper.eq("top_marking", topMarking);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        List<CardClassifyInfo> list = cardClassifyInfoMapper.selectList(wrapper);
+        ExcelUtil<CardClassifyInfo> util = new ExcelUtil<CardClassifyInfo>(CardClassifyInfo.class);
+        return util.exportExcel(list, "操作日志");
+    }
 }

+ 1 - 1
xiaochengxu/config/index.js

@@ -1,5 +1,5 @@
 const dev = {
-	baseUrlNew: 'http://192.168.110.138:8182',
+	baseUrlNew: 'http://192.168.110.72:8182',
 	// baseUrlNew: 'https://shiyaopinche.cspc.cn:10443',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 0 - 4
xiaochengxu/main.js

@@ -13,10 +13,6 @@ Vue.prototype.$request = request
 Vue.prototype.$helper = helper
 import store from './store'
 Vue.prototype.$store = store
-import MescrollBody from "@/components/mescroll-uni/components/mescroll-body/mescroll-body.vue"
-import MescrollUni from "@/components/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"
-Vue.component('mescroll-body', MescrollBody)
-Vue.component('mescroll-uni', MescrollUni)
 App.mpType = 'app'
 
 const app = new Vue({

+ 9 - 1
xiaochengxu/pages/mySet/cardType.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
+		<mescroll-body  :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
 			<u-list @scrolltolower="scrolltolower">
 				<u-list-item  v-for='item in cardTypeList'>
 					<view class='flex'>
@@ -43,6 +43,14 @@
 				cardTypeList:[],
 				cardTypeData:{},
 				userInfo:{},
+				upOption:{
+					page:{
+					  num : 0 ,
+					  size : 10 ,
+					  time : null
+					} 
+				}
+				
 			};
 		},
 		onLoad() {

+ 1 - 1
xiaochengxu/pages/mySet/editCard.vue

@@ -11,7 +11,7 @@
 				<view class="">
 					{{cardInfo.companyName}}
 				</view>
-				<view class="">
+				<view class="">111
 					地址
 				</view>
 				<view class="">

+ 1 - 0
xiaochengxu/pages/mySet/newCard.vue

@@ -175,6 +175,7 @@
 						type: 'success',
 						message: '提交成功!',
 					})
+					uni.navigateBack()
 				})
 			},
 			submit() {