From ce3420676d9ccf4a2bdf87aeb7ad1494b5e5d26c Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 09 四月 2022 14:42:26 +0800
Subject: [PATCH] 图片上传与邀请图完善

---
 app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java |   71 +++++++++++++++++++++--------------
 1 files changed, 43 insertions(+), 28 deletions(-)

diff --git a/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java b/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java
index 62c20a0..b2d10c6 100644
--- a/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java
+++ b/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java
@@ -8,84 +8,99 @@
 
 import java.util.List;
 import java.util.Date;
+
 import org.yeshi.utils.mongo.MongodbBaseDao;
 import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
+
 import java.lang.String;
+
 import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
+
 import java.lang.Integer;
+
 import com.yeshi.makemoney.app.entity.SystemEnum;
+
 import java.util.ArrayList;
 
 
 @Repository
-public class GoldCornGetPriceDao extends MongodbBaseDao<GoldCornGetPrice>{
+public class GoldCornGetPriceDao extends MongodbBaseDao<GoldCornGetPrice> {
 
-  public void updateSelective(GoldCornGetPrice bean) {
+    public void updateSelective(GoldCornGetPrice bean) {
         Query query = new Query();
-        Update update=new Update();
+        Update update = new Update();
         query.addCriteria(Criteria.where("id").is(bean.getId()));
-        if(bean.getSystem() != null) {
+        if (bean.getSystem() != null) {
             update.set("system", bean.getSystem());
         }
-        if(bean.getType() != null) {
+        if (bean.getType() != null) {
             update.set("type", bean.getType());
         }
-        if(bean.getCornNum() != null) {
+        if (bean.getCornNum() != null) {
             update.set("cornNum", bean.getCornNum());
         }
-        if(bean.getValidateTime() != null) {
+        if (bean.getValidateTime() != null) {
             update.set("validateTime", bean.getValidateTime());
         }
-        if(bean.getRemarks() != null) {
+        if (bean.getRemarks() != null) {
             update.set("remarks", bean.getRemarks());
         }
-        if(bean.getCreateTime() != null) {
+
+        if (bean.getTeamGainRate() != null) {
+            update.set("teamGainRate", bean.getTeamGainRate());
+        }
+        if (bean.getTeamDivide() != null) {
+            update.set("teamDivide", bean.getTeamDivide());
+        }
+
+
+        if (bean.getCreateTime() != null) {
             update.set("createTime", bean.getCreateTime());
         }
         update.set("updateTime", new Date());
         update(query, update);
-  }
+    }
 
 
-  public List<GoldCornGetPrice> list(DaoQuery daoQuery){
+    public List<GoldCornGetPrice> list(DaoQuery daoQuery) {
         Query query = getQuery(daoQuery);
-        if (daoQuery.sortList!=null && daoQuery.sortList.size()>0){
+        if (daoQuery.sortList != null && daoQuery.sortList.size() > 0) {
             query.with(Sort.by(daoQuery.sortList));
         }
         query.skip(daoQuery.start);
         query.limit(daoQuery.count);
         return findList(query);
-  }
+    }
 
-  public long count(DaoQuery daoQuery){
-        Query query=getQuery(daoQuery);
+    public long count(DaoQuery daoQuery) {
+        Query query = getQuery(daoQuery);
         return count(query);
-  }
+    }
 
-  private Query getQuery(DaoQuery daoQuery){
-        List<Criteria> andList=new ArrayList<>();
-        if(daoQuery.system!=null){
+    private Query getQuery(DaoQuery daoQuery) {
+        List<Criteria> andList = new ArrayList<>();
+        if (daoQuery.system != null) {
             andList.add(Criteria.where("system").is(daoQuery.system));
         }
-        if(daoQuery.type!=null){
+        if (daoQuery.type != null) {
             andList.add(Criteria.where("type").is(daoQuery.type));
         }
-        if(daoQuery.maxValidateTime!=null){
+        if (daoQuery.maxValidateTime != null) {
             andList.add(Criteria.where("validateTime").lt(daoQuery.maxValidateTime));
         }
-        if(daoQuery.minValidateTime!=null){
+        if (daoQuery.minValidateTime != null) {
             andList.add(Criteria.where("validateTime").gte(daoQuery.minValidateTime));
         }
-        Query query=new Query();
-        Criteria[]  ands=new Criteria[andList.size()];
+        Query query = new Query();
+        Criteria[] ands = new Criteria[andList.size()];
         andList.toArray(ands);
-        if(ands.length>0){
+        if (ands.length > 0) {
             query.addCriteria(new Criteria().andOperator(ands));
         }
         return query;
-  }
+    }
 
-  public static class DaoQuery{
+    public static class DaoQuery {
         public SystemEnum system;
         public GoldCornGetType type;
         public Date maxValidateTime;
@@ -93,5 +108,5 @@
         public int start;
         public int count;
         public List<Sort.Order> sortList;
-  }
+    }
 }

--
Gitblit v1.8.0