From 30d8e227e8d823b6c38c3b9c90ac2df03b63befe Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 25 二月 2025 16:41:22 +0800 Subject: [PATCH] 淘宝转链接口更新 --- fanli/src/main/java/com/yeshi/fanli/dao/user/vip/GiveVIPApplyInfoDao.java | 332 +++++++++++++++++++++++++++--------------------------- 1 files changed, 166 insertions(+), 166 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/user/vip/GiveVIPApplyInfoDao.java b/fanli/src/main/java/com/yeshi/fanli/dao/user/vip/GiveVIPApplyInfoDao.java index 2bc8e8d..4d0221d 100644 --- a/fanli/src/main/java/com/yeshi/fanli/dao/user/vip/GiveVIPApplyInfoDao.java +++ b/fanli/src/main/java/com/yeshi/fanli/dao/user/vip/GiveVIPApplyInfoDao.java @@ -1,166 +1,166 @@ -package com.yeshi.fanli.dao.user.vip; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.springframework.data.domain.Sort; -import org.springframework.data.mongodb.core.query.Criteria; -import org.springframework.data.mongodb.core.query.Query; -import org.springframework.data.mongodb.core.query.Update; -import org.springframework.stereotype.Repository; - -import com.yeshi.common.MongodbBaseDao; -import com.yeshi.fanli.entity.bus.user.vip.GiveVIPApplyInfo; - -@Repository -public class GiveVIPApplyInfoDao extends MongodbBaseDao<GiveVIPApplyInfo> { - - /** - * 鏌ヨ鍒楄〃 - * @Title: list - * @Description: - * @param sourceUid - * @param state - * @param start - * @param count - * @return - * List<GiveVIPApplyInfo> 杩斿洖绫诲瀷 - * @throws - */ - public List<GiveVIPApplyInfo> listByTargetUid(Long targetUid, Integer state, int start, int count) { - Query query = new Query(); - - List<Criteria> list = new ArrayList<Criteria>(); - if (targetUid != null) - list.add(Criteria.where("targetUid").is(targetUid)); - - if (state != null) - list.add(Criteria.where("state").is(state)); - - if (list.size() > 0) { - Criteria[] cas = new Criteria[list.size()]; - for (int i = 0; i < list.size(); i++) - cas[i] = list.get(i); - query.addCriteria(new Criteria().andOperator(cas)); - } - query.skip(start); - query.limit(count); - query.with(new Sort(Sort.Direction.DESC, "createTime")); - return findList(query); - } - - public long countByTargetUid(Long targetUid, Integer state) { - Query query = new Query(); - - List<Criteria> list = new ArrayList<Criteria>(); - if (targetUid != null) - list.add(Criteria.where("targetUid").is(targetUid)); - - if (state != null) - list.add(Criteria.where("state").is(state)); - - if (list.size() > 0) { - - Criteria[] cas = new Criteria[list.size()]; - for (int i = 0; i < list.size(); i++) - cas[i] = list.get(i); - query.addCriteria(new Criteria().andOperator(cas)); - } - return count(query); - } - - - - public List<GiveVIPApplyInfo> listBySourceUid(Long sourceUid, Integer state, int start, int count) { - Query query = new Query(); - - List<Criteria> list = new ArrayList<Criteria>(); - if (sourceUid != null) - list.add(Criteria.where("sourceUid").is(sourceUid)); - - if (state != null) - list.add(Criteria.where("state").is(state)); - - if (list.size() > 0) { - Criteria[] cas = new Criteria[list.size()]; - for (int i = 0; i < list.size(); i++) - cas[i] = list.get(i); - query.addCriteria(new Criteria().andOperator(cas)); - } - query.skip(start); - query.limit(count); - query.with(new Sort(Sort.Direction.DESC, "createTime")); - return findList(query); - } - - public long countBySourceUid(Long sourceUid, Integer state) { - Query query = new Query(); - - List<Criteria> list = new ArrayList<Criteria>(); - if (sourceUid != null) - list.add(Criteria.where("sourceUid").is(sourceUid)); - - if (state != null) - list.add(Criteria.where("state").is(state)); - - if (list.size() > 0) { - - Criteria[] cas = new Criteria[list.size()]; - for (int i = 0; i < list.size(); i++) - cas[i] = list.get(i); - query.addCriteria(new Criteria().andOperator(cas)); - } - return count(query); - } - - public void updateSelective(GiveVIPApplyInfo info) { - Query query = new Query(); - query.addCriteria(Criteria.where("id").is(info.getId())); - Update update = new Update(); - if (info.getHasDoOtherPlatform() != null) - update.set("hasDoOtherPlatform", info.getHasDoOtherPlatform()); - if (info.getApplyReason() != null) - update.set("getApplyReson", info.getApplyReason()); - if (info.getImgList() != null) - update.set("imgList", info.getImgList()); - if (info.getLevel() != null) - update.set("level", info.getLevel()); - if (info.getMark() != null) - update.set("mark", info.getMark()); - if (info.getOtherDirectTeams() != null) - update.set("otherDirectTeams", info.getOtherDirectTeams()); - if (info.getOtherInDirectTeams() != null) - update.set("otherInDirectTeams", info.getOtherInDirectTeams()); - if (info.getOtherLevel() != null) - update.set("otherLevel", info.getOtherLevel()); - if (info.getOtherMonthIncome() != null) - update.set("otherMonthIncome", info.getOtherMonthIncome()); - if (info.getOtherPlatformName() != null) - update.set("otherPlatformName", info.getOtherPlatformName()); - if (info.getPhone() != null) - update.set("phone", info.getPhone()); - if (info.getRejectReson() != null) - update.set("rejectReson", info.getRejectReson()); - if (info.getSourceUid() != null) - update.set("sourceUid", info.getSourceUid()); - if (info.getState() != null) - update.set("state", info.getState()); - if (info.getTargetUid() != null) - update.set("targetUid", info.getTargetUid()); - if (info.getVerifyTime() != null) - update.set("verifyTime", info.getVerifyTime()); - if (info.getWxID() != null) - update.set("wxID", info.getWxID()); - update.set("updateTime", new Date()); - update(query, update); - } - - public void saveImgs(String id, List<String> imgList) { - GiveVIPApplyInfo info = new GiveVIPApplyInfo(); - info.setId(id); - info.setImgList(imgList); - updateSelective(info); - } - -} +package com.yeshi.fanli.dao.user.vip; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.springframework.data.domain.Sort; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.stereotype.Repository; + +import com.yeshi.common.MongodbBaseDao; +import com.yeshi.fanli.entity.bus.user.vip.GiveVIPApplyInfo; + +@Repository +public class GiveVIPApplyInfoDao extends MongodbBaseDao<GiveVIPApplyInfo> { + + /** + * 鏌ヨ鍒楄〃 + * @Title: list + * @Description: + * @param sourceUid + * @param state + * @param start + * @param count + * @return + * List<GiveVIPApplyInfo> 杩斿洖绫诲瀷 + * @throws + */ + public List<GiveVIPApplyInfo> listByTargetUid(Long targetUid, Integer state, int start, int count) { + Query query = new Query(); + + List<Criteria> list = new ArrayList<Criteria>(); + if (targetUid != null) + list.add(Criteria.where("targetUid").is(targetUid)); + + if (state != null) + list.add(Criteria.where("state").is(state)); + + if (list.size() > 0) { + Criteria[] cas = new Criteria[list.size()]; + for (int i = 0; i < list.size(); i++) + cas[i] = list.get(i); + query.addCriteria(new Criteria().andOperator(cas)); + } + query.skip(start); + query.limit(count); + query.with(new Sort(Sort.Direction.DESC, "createTime")); + return findList(query); + } + + public long countByTargetUid(Long targetUid, Integer state) { + Query query = new Query(); + + List<Criteria> list = new ArrayList<Criteria>(); + if (targetUid != null) + list.add(Criteria.where("targetUid").is(targetUid)); + + if (state != null) + list.add(Criteria.where("state").is(state)); + + if (list.size() > 0) { + + Criteria[] cas = new Criteria[list.size()]; + for (int i = 0; i < list.size(); i++) + cas[i] = list.get(i); + query.addCriteria(new Criteria().andOperator(cas)); + } + return count(query); + } + + + + public List<GiveVIPApplyInfo> listBySourceUid(Long sourceUid, Integer state, int start, int count) { + Query query = new Query(); + + List<Criteria> list = new ArrayList<Criteria>(); + if (sourceUid != null) + list.add(Criteria.where("sourceUid").is(sourceUid)); + + if (state != null) + list.add(Criteria.where("state").is(state)); + + if (list.size() > 0) { + Criteria[] cas = new Criteria[list.size()]; + for (int i = 0; i < list.size(); i++) + cas[i] = list.get(i); + query.addCriteria(new Criteria().andOperator(cas)); + } + query.skip(start); + query.limit(count); + query.with(new Sort(Sort.Direction.DESC, "createTime")); + return findList(query); + } + + public long countBySourceUid(Long sourceUid, Integer state) { + Query query = new Query(); + + List<Criteria> list = new ArrayList<Criteria>(); + if (sourceUid != null) + list.add(Criteria.where("sourceUid").is(sourceUid)); + + if (state != null) + list.add(Criteria.where("state").is(state)); + + if (list.size() > 0) { + + Criteria[] cas = new Criteria[list.size()]; + for (int i = 0; i < list.size(); i++) + cas[i] = list.get(i); + query.addCriteria(new Criteria().andOperator(cas)); + } + return count(query); + } + + public void updateSelective(GiveVIPApplyInfo info) { + Query query = new Query(); + query.addCriteria(Criteria.where("id").is(info.getId())); + Update update = new Update(); + if (info.getHasDoOtherPlatform() != null) + update.set("hasDoOtherPlatform", info.getHasDoOtherPlatform()); + if (info.getApplyReason() != null) + update.set("getApplyReson", info.getApplyReason()); + if (info.getImgList() != null) + update.set("imgList", info.getImgList()); + if (info.getLevel() != null) + update.set("level", info.getLevel()); + if (info.getMark() != null) + update.set("mark", info.getMark()); + if (info.getOtherDirectTeams() != null) + update.set("otherDirectTeams", info.getOtherDirectTeams()); + if (info.getOtherInDirectTeams() != null) + update.set("otherInDirectTeams", info.getOtherInDirectTeams()); + if (info.getOtherLevel() != null) + update.set("otherLevel", info.getOtherLevel()); + if (info.getOtherMonthIncome() != null) + update.set("otherMonthIncome", info.getOtherMonthIncome()); + if (info.getOtherPlatformName() != null) + update.set("otherPlatformName", info.getOtherPlatformName()); + if (info.getPhone() != null) + update.set("phone", info.getPhone()); + if (info.getRejectReson() != null) + update.set("rejectReson", info.getRejectReson()); + if (info.getSourceUid() != null) + update.set("sourceUid", info.getSourceUid()); + if (info.getState() != null) + update.set("state", info.getState()); + if (info.getTargetUid() != null) + update.set("targetUid", info.getTargetUid()); + if (info.getVerifyTime() != null) + update.set("verifyTime", info.getVerifyTime()); + if (info.getWxID() != null) + update.set("wxID", info.getWxID()); + update.set("updateTime", new Date()); + update(query, update); + } + + public void saveImgs(String id, List<String> imgList) { + GiveVIPApplyInfo info = new GiveVIPApplyInfo(); + info.setId(id); + info.setImgList(imgList); + updateSelective(info); + } + +} -- Gitblit v1.8.0