admin
2022-04-02 87532065ba0c304817c31628ebb1000f4e308f12
功能完善
2个文件已删除
19个文件已修改
51个文件已添加
5966 ■■■■■ 已修改文件
app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornConsumeRecordAdminController.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetFrequencyConfigAdminController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetPriceAdminController.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetRecordAdminController.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornMoneyExchangeRateRecordAdminController.java 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/money/ExtractAdminController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/config/SystemConfigDao.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornConsumeRecordDao.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetFrequencyConfigDao.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornMoneyExchangeRateRecordDao.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/config/AppJumpType.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/config/AppName.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/config/SystemConfigKey.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/config/SystemConfigType.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornConsumeRecord.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetFrequencyConfig.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetPrice.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetRecord.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornMoneyExchangeRateRecord.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/msg/AppPageNotifyMsg.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/entity/user/UserExtraInfo.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornConsumeRecordException.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornException.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetFrequencyConfigException.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetPriceException.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetRecordException.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornMoneyExchangeRateRecordException.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/config/SystemConfigServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornConsumeRecordServiceImpl.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetFrequencyConfigServiceImpl.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetPriceServiceImpl.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetRecordServiceImpl.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMoneyExchangeRateRecordServiceImpl.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/config/SystemConfigService.java 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornConsumeRecordService.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetFrequencyConfigService.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetPriceService.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetRecordService.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornMoneyExchangeRateRecordService.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornConsumeRecordQuery.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetFrequencyConfigQuery.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetPriceQuery.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetRecordQuery.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornMoneyExchangeRateRecordQuery.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/utils/factory/AppJumpParamsFactory.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/vo/admin/goldcorn/GoldCornGetPriceAdminVO.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/vo/admin/goldcorn/GoldCornMoneyExchangeRateAdminVO.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/generator/backup.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/generator/full.xml 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/generator/list.xml 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/generator/team.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/mapper/ExtractMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/mapper/UserMoneyRecordMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/config/system_config_add.html 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_consume_record_list.html 270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_add.html 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_list.html 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_update.html 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_price_add.html 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_price_list.html 308 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_price_update.html 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_get_record_list.html 283 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_add.html 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_list.html 261 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_update.html 190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/index.html 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/money/extract_list.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/money/user_money_record_list.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/resources/static/team/team_invite_relation_list.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java
@@ -2,8 +2,11 @@
import com.google.gson.*;
import com.yeshi.makemoney.app.entity.config.SystemConfig;
import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
import com.yeshi.makemoney.app.service.inter.config.SystemConfigService;
import com.yeshi.makemoney.app.service.query.config.SystemConfigQuery;
import com.yeshi.makemoney.app.vo.AcceptAdminData;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -25,14 +28,14 @@
    private SystemConfigService systemConfigService;
    private String loadPrint(String callback, String root){
          return root;
    private String loadPrint(String callback, String root) {
        return root;
    }
    @ResponseBody
    @RequestMapping("list")
    public String list(SystemConfigQuery query, int page, int limit, String callback) {
        List<SystemConfig> list = systemConfigService.list(query,page,limit);
        List<SystemConfig> list = systemConfigService.list(query, page, limit);
        long count = systemConfigService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
@@ -50,11 +53,12 @@
    @ResponseBody
    @RequestMapping("add")
    public String add(SystemConfig bean, HttpSession session, String callback) {
        try{
    public String add(SystemConfig bean, AcceptAdminData acceptAdminData, String callback) {
        try {
            bean.setSystem(acceptAdminData.getSystem());
            systemConfigService.add(bean);
            return loadPrint(callback, JsonUtil.loadTrueResult(""));
        }catch(Exception e){
        } catch (Exception e) {
            return loadPrint(callback, JsonUtil.loadFalseResult(e.getMessage()));
        }
    }
@@ -63,7 +67,7 @@
    @RequestMapping("get")
    public String get(String id, HttpSession session, String callback) {
        SystemConfig entity = systemConfigService.get(id);
        if (entity !=null){
        if (entity != null) {
            return loadPrint(callback, JsonUtil.loadTrueResult(entity));
        } else {
            return loadPrint(callback, JsonUtil.loadFalseResult("ID不存在"));
@@ -73,17 +77,31 @@
    @ResponseBody
    @RequestMapping("update")
    public String update(SystemConfig bean, HttpSession session,String callback) {
    public String update(SystemConfig bean, HttpSession session, String callback) {
        if (bean.getId() == null) {
            return loadPrint(callback, JsonUtil.loadFalseResult("ID不能为空"));
        }
        try{
        try {
            systemConfigService.update(bean);
        }catch(Exception e){
        } catch (Exception e) {
            return loadPrint(callback, JsonUtil.loadFalseResult(e.getMessage()));
        }
        return loadPrint(callback, JsonUtil.loadTrueResult(""));
    }
    @ResponseBody
    @RequestMapping("getKeyList")
    public String getKeyList() {
        JSONArray array = new JSONArray();
        for (SystemConfigKey key : SystemConfigKey.values()) {
            JSONObject data = new JSONObject();
            data.put("key", key.name());
            data.put("value", key.getDesc());
            array.add(data);
        }
        return JsonUtil.loadTrueResult(array);
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornConsumeRecordAdminController.java
New file
@@ -0,0 +1,76 @@
package com.yeshi.makemoney.app.controller.admin.goldcorn;
import com.google.gson.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.TimeUtil;
import com.google.gson.reflect.TypeToken;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Type;
import java.util.Date;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornConsumeRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornConsumeRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornConsumeRecordQuery;
@Controller
@RequestMapping("admin/api/goldcorn/consume/record")
public class GoldCornConsumeRecordAdminController {
    @Resource
    private GoldCornConsumeRecordService goldCornConsumeRecordService;
   @ResponseBody
    @RequestMapping("list")
    public String list(GoldCornConsumeRecordQuery query, int page, int limit ) {
        List<GoldCornConsumeRecord> list = goldCornConsumeRecordService.list(query,page,limit);
        long count = goldCornConsumeRecordService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {
                return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm"));
            }
        }).create();
        data.put("list", gson.toJson(list));
        data.put("count", count);
        return JsonUtil.loadTrueResult(data);
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids) {
        Type type = new TypeToken<List<String>>(){}.getType();
        List<String> idList=new Gson().fromJson(ids,type);
        goldCornConsumeRecordService.delete(idList);
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("get")
    public String get(String id, HttpSession session) {
        GoldCornConsumeRecord entity = goldCornConsumeRecordService.get(id);
        if (entity !=null){
            return JsonUtil.loadTrueResult(entity);
        } else {
            return JsonUtil.loadFalseResult("ID不存在");
        }
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetFrequencyConfigAdminController.java
New file
@@ -0,0 +1,104 @@
package com.yeshi.makemoney.app.controller.admin.goldcorn;
import com.google.gson.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.TimeUtil;
import com.google.gson.reflect.TypeToken;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Type;
import java.util.Date;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetFrequencyConfig;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetFrequencyConfigService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetFrequencyConfigQuery;
@Controller
@RequestMapping("admin/api/goldcorn/get/config")
public class GoldCornGetFrequencyConfigAdminController {
    @Resource
    private GoldCornGetFrequencyConfigService goldCornGetFrequencyConfigService;
   @ResponseBody
    @RequestMapping("list")
    public String list(GoldCornGetFrequencyConfigQuery query, int page, int limit ) {
        List<GoldCornGetFrequencyConfig> list = goldCornGetFrequencyConfigService.list(query,page,limit);
        long count = goldCornGetFrequencyConfigService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {
                return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm"));
            }
        }).create();
        data.put("list", gson.toJson(list));
        data.put("count", count);
        return JsonUtil.loadTrueResult(data);
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids) {
        Type type = new TypeToken<List<String>>(){}.getType();
        List<String> idList=new Gson().fromJson(ids,type);
        goldCornGetFrequencyConfigService.delete(idList);
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("add")
    public String add(GoldCornGetFrequencyConfig bean, HttpSession session) {
        try{
            goldCornGetFrequencyConfigService.add(bean);
            return JsonUtil.loadTrueResult("");
        }catch(Exception e){
            return JsonUtil.loadFalseResult(e.getMessage());
        }
    }
    @ResponseBody
    @RequestMapping("get")
    public String get(String id, HttpSession session) {
        GoldCornGetFrequencyConfig entity = goldCornGetFrequencyConfigService.get(id);
        if (entity !=null){
            return JsonUtil.loadTrueResult(entity);
        } else {
            return JsonUtil.loadFalseResult("ID不存在");
        }
    }
    @ResponseBody
    @RequestMapping("update")
    public String update(GoldCornGetFrequencyConfig bean, HttpSession session) {
        if (bean.getId() == null) {
           return JsonUtil.loadFalseResult("ID不能为空");
        }
        try{
            goldCornGetFrequencyConfigService.update(bean);
        }catch(Exception e){
            return JsonUtil.loadFalseResult(e.getMessage());
        }
        return JsonUtil.loadTrueResult("");
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetPriceAdminController.java
New file
@@ -0,0 +1,127 @@
package com.yeshi.makemoney.app.controller.admin.goldcorn;
import com.google.gson.*;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import com.yeshi.makemoney.app.vo.AcceptAdminData;
import com.yeshi.makemoney.app.vo.admin.goldcorn.GoldCornGetPriceAdminVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.TimeUtil;
import com.google.gson.reflect.TypeToken;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Type;
import java.util.Date;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetPriceService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetPriceQuery;
@Controller
@RequestMapping("admin/api/goldcorn/price")
public class GoldCornGetPriceAdminController {
    @Resource
    private GoldCornGetPriceService goldCornGetPriceService;
    @ResponseBody
    @RequestMapping("list")
    public String list(GoldCornGetPriceQuery query, int page, int limit) {
        List<GoldCornGetPrice> list = goldCornGetPriceService.list(query, page, limit);
        long count = goldCornGetPriceService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {
                return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm"));
            }
        }).registerTypeAdapter(GoldCornGetType.class, new JsonSerializer<GoldCornGetType>() {
            @Override
            public JsonElement serialize(GoldCornGetType value, Type type, JsonSerializationContext jsonSerializationContext) {
                return value == null ? new JsonPrimitive("") : new JsonPrimitive(value.getName());
            }
        }).create();
        data.put("list", gson.toJson(list));
        data.put("count", count);
        return JsonUtil.loadTrueResult(data);
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids) {
        Type type = new TypeToken<List<String>>() {
        }.getType();
        List<String> idList = new Gson().fromJson(ids, type);
        goldCornGetPriceService.delete(idList);
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("add")
    public String add(GoldCornGetPriceAdminVO vo, AcceptAdminData acceptAdminData) {
        try {
            goldCornGetPriceService.add(vo.toEntity(acceptAdminData.getSystem()));
            return JsonUtil.loadTrueResult("");
        } catch (Exception e) {
            return JsonUtil.loadFalseResult(e.getMessage());
        }
    }
    @ResponseBody
    @RequestMapping("get")
    public String get(String id, HttpSession session) {
        GoldCornGetPrice entity = goldCornGetPriceService.get(id);
        if (entity != null) {
            return JsonUtil.loadTrueResult(GoldCornGetPriceAdminVO.create(entity));
        } else {
            return JsonUtil.loadFalseResult("ID不存在");
        }
    }
    @ResponseBody
    @RequestMapping("update")
    public String update(GoldCornGetPriceAdminVO vo) {
        if (vo.getId() == null) {
            return JsonUtil.loadFalseResult("ID不能为空");
        }
        try {
            goldCornGetPriceService.update(vo.toEntity(null));
        } catch (Exception e) {
            return JsonUtil.loadFalseResult(e.getMessage());
        }
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("getPriceTypes")
    public String getPriceTypes(HttpSession session) {
        JSONArray array = new JSONArray();
        for (GoldCornGetType type : GoldCornGetType.values()) {
            JSONObject json = new JSONObject();
            json.put("key", type.name());
            json.put("value", type.getName());
            array.add(json);
        }
        return JsonUtil.loadTrueResult(array);
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetRecordAdminController.java
New file
@@ -0,0 +1,84 @@
package com.yeshi.makemoney.app.controller.admin.goldcorn;
import com.google.gson.*;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.TimeUtil;
import com.google.gson.reflect.TypeToken;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Type;
import java.util.Date;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetRecordQuery;
@Controller
@RequestMapping("admin/api/goldcorn/get/record")
public class GoldCornGetRecordAdminController {
    @Resource
    private GoldCornGetRecordService goldCornGetRecordService;
    @ResponseBody
    @RequestMapping("list")
    public String list(GoldCornGetRecordQuery query, int page, int limit) {
        List<GoldCornGetRecord> list = goldCornGetRecordService.list(query, page, limit);
        long count = goldCornGetRecordService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {
                return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm"));
            }
        }).registerTypeAdapter(GoldCornGetType.class, new JsonSerializer<GoldCornGetType>() {
            @Override
            public JsonElement serialize(GoldCornGetType value, Type type, JsonSerializationContext jsonSerializationContext) {
                return value == null ? new JsonPrimitive("") : new JsonPrimitive(value.getName());
            }
        }).create();
        data.put("list", gson.toJson(list));
        data.put("count", count);
        return JsonUtil.loadTrueResult(data);
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids) {
        Type type = new TypeToken<List<String>>() {
        }.getType();
        List<String> idList = new Gson().fromJson(ids, type);
        goldCornGetRecordService.delete(idList);
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("get")
    public String get(String id, HttpSession session) {
        GoldCornGetRecord entity = goldCornGetRecordService.get(id);
        if (entity != null) {
            return JsonUtil.loadTrueResult(entity);
        } else {
            return JsonUtil.loadFalseResult("ID不存在");
        }
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornMoneyExchangeRateRecordAdminController.java
New file
@@ -0,0 +1,122 @@
package com.yeshi.makemoney.app.controller.admin.goldcorn;
import com.google.gson.*;
import com.yeshi.makemoney.app.utils.SystemInfoUtil;
import com.yeshi.makemoney.app.vo.admin.goldcorn.GoldCornMoneyExchangeRateAdminVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.SystemUtil;
import org.yeshi.utils.TimeUtil;
import com.google.gson.reflect.TypeToken;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornMoneyExchangeRateRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornMoneyExchangeRateRecordQuery;
@Controller
@RequestMapping("admin/api/goldcorn/exchangerate")
public class GoldCornMoneyExchangeRateRecordAdminController {
    @Resource
    private GoldCornMoneyExchangeRateRecordService goldCornMoneyExchangeRateRecordService;
    @ResponseBody
    @RequestMapping("list")
    public String list(GoldCornMoneyExchangeRateRecordQuery query, int page, int limit) {
        List<GoldCornMoneyExchangeRateRecord> list = goldCornMoneyExchangeRateRecordService.list(query, page, limit);
        long count = goldCornMoneyExchangeRateRecordService.count(query);
        JSONObject data = new JSONObject();
        Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
            @Override
            public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) {
                return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm"));
            }
        }).create();
        data.put("list", gson.toJson(list));
        data.put("count", count);
        return JsonUtil.loadTrueResult(data);
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids) {
        Type type = new TypeToken<List<String>>() {
        }.getType();
        List<String> idList = new Gson().fromJson(ids, type);
        for (String id : idList) {
            //生效之后无法修改,无法删除
            GoldCornMoneyExchangeRateRecord record = goldCornMoneyExchangeRateRecordService.get(id);
            if (record.getValidateTime().getTime() <= System.currentTimeMillis()) {
                return JsonUtil.loadFalseResult("已经生效的设置无法删除");
            }
        }
        goldCornMoneyExchangeRateRecordService.delete(idList);
        return JsonUtil.loadTrueResult("");
    }
    @ResponseBody
    @RequestMapping("add")
    public String add(GoldCornMoneyExchangeRateAdminVO vo, HttpSession session) {
        try {
            GoldCornMoneyExchangeRateRecord bean = vo.toEntity(SystemInfoUtil.getAdminSelectedSystem(session));
            goldCornMoneyExchangeRateRecordService.add(bean);
            return JsonUtil.loadTrueResult("");
        } catch (Exception e) {
            return JsonUtil.loadFalseResult(e.getMessage());
        }
    }
    @ResponseBody
    @RequestMapping("get")
    public String get(String id, HttpSession session) {
        GoldCornMoneyExchangeRateRecord entity = goldCornMoneyExchangeRateRecordService.get(id);
        if (entity != null) {
            return JsonUtil.loadTrueResult(GoldCornMoneyExchangeRateAdminVO.create(entity));
        } else {
            return JsonUtil.loadFalseResult("ID不存在");
        }
    }
    @ResponseBody
    @RequestMapping("update")
    public String update(GoldCornMoneyExchangeRateAdminVO bean, HttpSession session) {
        if (bean.getId() == null) {
            return JsonUtil.loadFalseResult("ID不能为空");
        }
        //生效之后无法修改,无法删除
        GoldCornMoneyExchangeRateRecord record = goldCornMoneyExchangeRateRecordService.get(bean.getId());
        if (record.getValidateTime().getTime() <= System.currentTimeMillis()) {
            return JsonUtil.loadFalseResult("已经生效的设置无法修改");
        }
        try {
            goldCornMoneyExchangeRateRecordService.update(bean.toEntity(null));
        } catch (Exception e) {
            return JsonUtil.loadFalseResult(e.getMessage());
        }
        return JsonUtil.loadTrueResult("");
    }
}
app/src/main/java/com/yeshi/makemoney/app/controller/admin/money/ExtractAdminController.java
@@ -46,16 +46,6 @@
    }
    @ResponseBody
    @RequestMapping("delete")
    public String delete(String ids, String callback) {
        Type type = new TypeToken<List<Long>>(){}.getType();
        List<Long> idList=new Gson().fromJson(ids,type);
        extractService.delete(idList);
        return JsonUtil.loadJSONP(callback,JsonUtil.loadTrueResult(""));
    }
    @ResponseBody
    @RequestMapping("get")
app/src/main/java/com/yeshi/makemoney/app/dao/config/SystemConfigDao.java
@@ -7,90 +7,105 @@
import org.springframework.stereotype.Repository;
import java.util.List;
import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
import com.yeshi.makemoney.app.entity.SystemEnum;
import java.util.Date;
import org.yeshi.utils.mongo.MongodbBaseDao;
import java.lang.String;
import com.yeshi.makemoney.app.entity.config.SystemConfig;
import java.util.ArrayList;
@Repository
public class SystemConfigDao extends MongodbBaseDao<SystemConfig>{
public class SystemConfigDao extends MongodbBaseDao<SystemConfig> {
  public void updateSelective(SystemConfig bean) {
    public void updateSelective(SystemConfig bean) {
        Query query = new Query();
        Update update=new Update();
        Update update = new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getName() != null) {
        if (bean.getName() != null) {
            update.set("name", bean.getName());
        }
        if(bean.getKey() != null) {
        if (bean.getKey() != null) {
            update.set("key", bean.getKey());
        }
        if(bean.getSystem() != null) {
        if (bean.getSystem() != null) {
            update.set("system", bean.getSystem());
        }
        if(bean.getValue() != null) {
        if (bean.getValue() != null) {
            update.set("value", bean.getValue());
        }
        if(bean.getRemarks() != null) {
        if (bean.getRemarks() != null) {
            update.set("remarks", bean.getRemarks());
        }
        if(bean.getCreateTime() != null) {
        if (bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
    }
  public List<SystemConfig> list(DaoQuery daoQuery){
    public List<SystemConfig> 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.name!=null){
    private Query getQuery(DaoQuery daoQuery) {
        List<Criteria> andList = new ArrayList<>();
        if (daoQuery.name != null) {
            andList.add(Criteria.where("name").regex(daoQuery.name));
        }
        if(daoQuery.key!=null){
        if (daoQuery.key != null) {
            andList.add(Criteria.where("key").is(daoQuery.key));
        }
        if(daoQuery.system!=null){
        if (daoQuery.keyList != null) {
            Criteria[] keys = new Criteria[daoQuery.keyList.size()];
            for (int i = 0; i < daoQuery.keyList.size(); i++) {
                keys[i] = Criteria.where("key").is(daoQuery.keyList.get(i));
            }
            andList.add(new Criteria().orOperator(keys));
        }
        if (daoQuery.system != null) {
            andList.add(Criteria.where("system").is(daoQuery.system));
        }
        if(daoQuery.value!=null){
        if (daoQuery.value != null) {
            andList.add(Criteria.where("value").regex(daoQuery.value));
        }
        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 String name;
        public SystemConfigKey key;
        public List<SystemConfigKey> keyList;
        public SystemEnum system;
        public String value;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
    }
}
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornConsumeRecordDao.java
New file
@@ -0,0 +1,98 @@
package com.yeshi.makemoney.app.dao.goldcorn;
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.data.domain.Sort;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornConsumeType;
import java.lang.Long;
import java.util.Date;
import org.yeshi.utils.mongo.MongodbBaseDao;
import java.lang.String;
import java.lang.Integer;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornConsumeRecord;
import java.util.ArrayList;
@Repository
public class GoldCornConsumeRecordDao extends MongodbBaseDao<GoldCornConsumeRecord>{
  public void updateSelective(GoldCornConsumeRecord bean) {
        Query query = new Query();
        Update update=new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getUid() != null) {
            update.set("uid", bean.getUid());
        }
        if(bean.getCornNum() != null) {
            update.set("cornNum", bean.getCornNum());
        }
        if(bean.getType() != null) {
            update.set("type", bean.getType());
        }
        if(bean.getMoney() != null) {
            update.set("money", bean.getMoney());
        }
        if(bean.getRemarks() != null) {
            update.set("remarks", bean.getRemarks());
        }
        if(bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
  public List<GoldCornConsumeRecord> list(DaoQuery daoQuery){
        Query query = getQuery(daoQuery);
        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);
        return count(query);
  }
  private Query getQuery(DaoQuery daoQuery){
        List<Criteria> andList=new ArrayList<>();
        if(daoQuery.uid!=null){
            andList.add(Criteria.where("uid").is(daoQuery.uid));
        }
        if(daoQuery.type!=null){
            andList.add(Criteria.where("type").is(daoQuery.type));
        }
        if(daoQuery.maxCreateTime!=null){
            andList.add(Criteria.where("createTime").lt(daoQuery.maxCreateTime));
        }
        if(daoQuery.minCreateTime!=null){
            andList.add(Criteria.where("createTime").gte(daoQuery.minCreateTime));
        }
        Query query=new Query();
        Criteria[]  ands=new Criteria[andList.size()];
        andList.toArray(ands);
        if(ands.length>0){
            query.addCriteria(new Criteria().andOperator(ands));
        }
        return query;
  }
  public static class DaoQuery{
        public Long uid;
        public GoldCornConsumeType type;
        public Date maxCreateTime;
        public Date minCreateTime;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
}
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetFrequencyConfigDao.java
New file
@@ -0,0 +1,98 @@
package com.yeshi.makemoney.app.dao.goldcorn;
import com.yeshi.makemoney.app.entity.SystemEnum;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetFrequencyConfig;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
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 org.yeshi.utils.mongo.MongodbBaseDao;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Repository
public class GoldCornGetFrequencyConfigDao extends MongodbBaseDao<GoldCornGetFrequencyConfig>{
  public void updateSelective(GoldCornGetFrequencyConfig bean) {
        Query query = new Query();
        Update update=new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getSystem() != null) {
            update.set("system", bean.getSystem());
        }
        if(bean.getType() != null) {
            update.set("type", bean.getType());
        }
        if(bean.getLimitCount() != null) {
            update.set("limitCount", bean.getLimitCount());
        }
        if(bean.getTimeUnit() != null) {
            update.set("timeUnit", bean.getTimeUnit());
        }
        if(bean.getValidateTime() != null) {
            update.set("validateTime", bean.getValidateTime());
        }
        if(bean.getRemarks() != null) {
            update.set("remarks", bean.getRemarks());
        }
        if(bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
  public List<GoldCornGetFrequencyConfig> list(DaoQuery daoQuery){
        Query query = getQuery(daoQuery);
        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);
        return count(query);
  }
  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){
            andList.add(Criteria.where("type").is(daoQuery.type));
        }
        if(daoQuery.maxValidateTime!=null){
            andList.add(Criteria.where("validateTime").lt(daoQuery.maxValidateTime));
        }
        if(daoQuery.minValidateTime!=null){
            andList.add(Criteria.where("validateTime").gte(daoQuery.minValidateTime));
        }
        Query query=new Query();
        Criteria[]  ands=new Criteria[andList.size()];
        andList.toArray(ands);
        if(ands.length>0){
            query.addCriteria(new Criteria().andOperator(ands));
        }
        return query;
  }
  public static class DaoQuery{
        public SystemEnum system;
        public GoldCornGetType type;
        public Date maxValidateTime;
        public Date minValidateTime;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
}
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetPriceDao.java
New file
@@ -0,0 +1,97 @@
package com.yeshi.makemoney.app.dao.goldcorn;
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.data.domain.Sort;
import org.springframework.stereotype.Repository;
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 void updateSelective(GoldCornGetPrice bean) {
        Query query = new Query();
        Update update=new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getSystem() != null) {
            update.set("system", bean.getSystem());
        }
        if(bean.getType() != null) {
            update.set("type", bean.getType());
        }
        if(bean.getCornNum() != null) {
            update.set("cornNum", bean.getCornNum());
        }
        if(bean.getValidateTime() != null) {
            update.set("validateTime", bean.getValidateTime());
        }
        if(bean.getRemarks() != null) {
            update.set("remarks", bean.getRemarks());
        }
        if(bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
  public List<GoldCornGetPrice> list(DaoQuery daoQuery){
        Query query = getQuery(daoQuery);
        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);
        return count(query);
  }
  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){
            andList.add(Criteria.where("type").is(daoQuery.type));
        }
        if(daoQuery.maxValidateTime!=null){
            andList.add(Criteria.where("validateTime").lt(daoQuery.maxValidateTime));
        }
        if(daoQuery.minValidateTime!=null){
            andList.add(Criteria.where("validateTime").gte(daoQuery.minValidateTime));
        }
        Query query=new Query();
        Criteria[]  ands=new Criteria[andList.size()];
        andList.toArray(ands);
        if(ands.length>0){
            query.addCriteria(new Criteria().andOperator(ands));
        }
        return query;
  }
  public static class DaoQuery{
        public SystemEnum system;
        public GoldCornGetType type;
        public Date maxValidateTime;
        public Date minValidateTime;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
}
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java
New file
@@ -0,0 +1,115 @@
package com.yeshi.makemoney.app.dao.goldcorn;
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.data.domain.Sort;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.lang.Long;
import java.util.Date;
import org.yeshi.utils.mongo.MongodbBaseDao;
import java.lang.String;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import java.lang.Integer;
import java.util.ArrayList;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord;
@Repository
public class GoldCornGetRecordDao extends MongodbBaseDao<GoldCornGetRecord>{
  public void updateSelective(GoldCornGetRecord bean) {
        Query query = new Query();
        Update update=new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getUid() != null) {
            update.set("uid", bean.getUid());
        }
        if(bean.getDay() != null) {
            update.set("day", bean.getDay());
        }
        if(bean.getCornNum() != null) {
            update.set("cornNum", bean.getCornNum());
        }
        if(bean.getFromUid() != null) {
            update.set("fromUid", bean.getFromUid());
        }
        if(bean.getFromId() != null) {
            update.set("fromId", bean.getFromId());
        }
        if(bean.getType() != null) {
            update.set("type", bean.getType());
        }
        if(bean.getRemarks() != null) {
            update.set("remarks", bean.getRemarks());
        }
        if(bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
  public List<GoldCornGetRecord> list(DaoQuery daoQuery){
        Query query = getQuery(daoQuery);
        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);
        return count(query);
  }
  private Query getQuery(DaoQuery daoQuery){
        List<Criteria> andList=new ArrayList<>();
        if(daoQuery.uid!=null){
            andList.add(Criteria.where("uid").is(daoQuery.uid));
        }
        if(daoQuery.day!=null){
            andList.add(Criteria.where("day").is(daoQuery.day));
        }
        if(daoQuery.fromUid!=null){
            andList.add(Criteria.where("fromUid").is(daoQuery.fromUid));
        }
        if(daoQuery.fromId!=null){
            andList.add(Criteria.where("fromId").is(daoQuery.fromId));
        }
        if(daoQuery.type!=null){
            andList.add(Criteria.where("type").is(daoQuery.type));
        }
        if(daoQuery.maxCreateTime!=null){
            andList.add(Criteria.where("createTime").lt(daoQuery.maxCreateTime));
        }
        if(daoQuery.minCreateTime!=null){
            andList.add(Criteria.where("createTime").gte(daoQuery.minCreateTime));
        }
        Query query=new Query();
        Criteria[]  ands=new Criteria[andList.size()];
        andList.toArray(ands);
        if(ands.length>0){
            query.addCriteria(new Criteria().andOperator(ands));
        }
        return query;
  }
  public static class DaoQuery{
        public Long uid;
        public String day;
        public Long fromUid;
        public String fromId;
        public GoldCornGetType type;
        public Date maxCreateTime;
        public Date minCreateTime;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
}
app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornMoneyExchangeRateRecordDao.java
New file
@@ -0,0 +1,93 @@
package com.yeshi.makemoney.app.dao.goldcorn;
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.data.domain.Sort;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
import java.util.Date;
import org.yeshi.utils.mongo.MongodbBaseDao;
import java.lang.String;
import com.yeshi.makemoney.app.entity.SystemEnum;
import java.util.ArrayList;
@Repository
public class GoldCornMoneyExchangeRateRecordDao extends MongodbBaseDao<GoldCornMoneyExchangeRateRecord>{
  public void updateSelective(GoldCornMoneyExchangeRateRecord bean) {
        Query query = new Query();
        Update update=new Update();
        query.addCriteria(Criteria.where("id").is(bean.getId()));
        if(bean.getDay() != null) {
            update.set("day", bean.getDay());
        }
        if(bean.getSystem() != null) {
            update.set("system", bean.getSystem());
        }
        if(bean.getRate() != null) {
            update.set("rate", bean.getRate());
        }
        if(bean.getValidateTime() != null) {
            update.set("validateTime", bean.getValidateTime());
        }
        if(bean.getCreateTime() != null) {
            update.set("createTime", bean.getCreateTime());
        }
        update.set("updateTime", new Date());
        update(query, update);
  }
  public List<GoldCornMoneyExchangeRateRecord> list(DaoQuery daoQuery){
        Query query = getQuery(daoQuery);
        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);
        return count(query);
  }
  private Query getQuery(DaoQuery daoQuery){
        List<Criteria> andList=new ArrayList<>();
        if(daoQuery.day!=null){
            andList.add(Criteria.where("day").is(daoQuery.day));
        }
        if(daoQuery.system!=null){
            andList.add(Criteria.where("system").is(daoQuery.system));
        }
        if(daoQuery.maxValidateTime!=null){
            andList.add(Criteria.where("validateTime").lt(daoQuery.maxValidateTime));
        }
        if(daoQuery.minValidateTime!=null){
            andList.add(Criteria.where("validateTime").gte(daoQuery.minValidateTime));
        }
        Query query=new Query();
        Criteria[]  ands=new Criteria[andList.size()];
        andList.toArray(ands);
        if(ands.length>0){
            query.addCriteria(new Criteria().andOperator(ands));
        }
        return query;
  }
  public static class DaoQuery{
        public String day;
        public SystemEnum system;
        public Date maxValidateTime;
        public Date minValidateTime;
        public int start;
        public int count;
        public List<Sort.Order> sortList;
  }
}
app/src/main/java/com/yeshi/makemoney/app/entity/config/AppJumpType.java
New file
@@ -0,0 +1,11 @@
package com.yeshi.makemoney.app.entity.config;
/**
 * @author hxh
 * @title: JumpType
 * @description: 应用跳转类型
 * @date 2022/4/2 14:10
 */
public enum AppJumpType {
    web, baichuan;
}
app/src/main/java/com/yeshi/makemoney/app/entity/config/AppName.java
New file
@@ -0,0 +1,80 @@
package com.yeshi.makemoney.app.entity.config;
import com.yeshi.makemoney.app.entity.SystemEnum;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
/**
 * @author hxh
 * @title: AppName
 * @description: 应用名称(分渠道)
 * @date 2022/4/2 14:18
 */
@Document(collection = "appName")
public class AppName {
    @Id
    private String id;
    @Indexed
    private SystemEnum system;
    @Indexed
    private String channel;
    private String name;
    private Date createTime;
    private Date updateTime;
    public String toId() {
        return system.name() + "-" + channel;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public SystemEnum getSystem() {
        return system;
    }
    public void setSystem(SystemEnum system) {
        this.system = system;
    }
    public String getChannel() {
        return channel;
    }
    public void setChannel(String channel) {
        this.channel = channel;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/config/SystemConfigKey.java
@@ -8,35 +8,47 @@
 */
public enum SystemConfigKey {
    signKey("签名Key"),
    defaultPortrait("默认头像"),
    defaultNickNamePrefix("默认昵称前缀"),
    wxAppId("微信开放平台APPId"),
    wxAppSecret("微信开放平台APPSecret"),
    aliyunOneKeyAuthAcessKey("阿里云一键登录appId"),
    aliyunOneKeyAuthAcessSecret("阿里云一键登录appSecret"),
    tencentSMSAppId("腾讯云短信APPID"),
    tencentSMSAppKey("腾讯云短信APPKey"),
    tencentVerifySMSTemplate("腾讯云验证码短信模板"),
    testAccount("测试账号"),
    signKey(SystemConfigType.system, "签名Key"),
    defaultPortrait(SystemConfigType.system, "默认头像"),
    defaultNickNamePrefix(SystemConfigType.system, "默认昵称前缀"),
    wxAppId(SystemConfigType.system, "微信开放平台APPId"),
    wxAppSecret(SystemConfigType.system, "微信开放平台APPSecret"),
    aliyunOneKeyAuthAcessKey(SystemConfigType.system, "阿里云一键登录appId"),
    aliyunOneKeyAuthAcessSecret(SystemConfigType.system, "阿里云一键登录appSecret"),
    tencentSMSAppId(SystemConfigType.system, "腾讯云短信APPID"),
    tencentSMSAppKey(SystemConfigType.system, "腾讯云短信APPKey"),
    tencentVerifySMSTemplate(SystemConfigType.system, "腾讯云验证码短信模板"),
    testAccount(SystemConfigType.system, "测试账号"),
    //返回给前端的数据
    kefu("客服链接"),
    course("教程链接"),
    unRegister("注销链接"),
    privacyComplain("隐私投诉链接"),
    vipLink("会员链接"),
    kefu(SystemConfigType.common, "客服链接"),
    course(SystemConfigType.common, "教程链接"),
    unRegister(SystemConfigType.common, "注销链接"),
    privacyComplain(SystemConfigType.common, "隐私投诉链接"),
    vipLink(SystemConfigType.common, "会员链接"),
    //资金相关配置
    extractConfig("提现配置");
    extractConfig(SystemConfigType.extract, "提现配置"),
    //团队分成比例配置
    teamFirstDivideRate(SystemConfigType.team, "团队一级分成比例(0-1)"),
    teamSecondDivideRate(SystemConfigType.team, "团队二级分成比例(0-1)"),
    ;
    private String desc;
    private SystemConfigType type;
    public String getDesc() {
        return desc;
    }
    private SystemConfigKey(String desc) {
    public SystemConfigType getType() {
        return type;
    }
    private SystemConfigKey(SystemConfigType type, String desc) {
        this.type = type;
        this.desc = desc;
    }
app/src/main/java/com/yeshi/makemoney/app/entity/config/SystemConfigType.java
New file
@@ -0,0 +1,25 @@
package com.yeshi.makemoney.app.entity.config;
/**
 * @author hxh
 * @title: SystemConfigType
 * @description: 系统配置分类
 * @date 2022/4/2 15:15
 */
public enum SystemConfigType {
    common("通用"),
    system("系統相关"),
    extract("提现"),
    team("团队"),
    ;
    private String name;
    private SystemConfigType(String name) {
    }
    public String getName() {
        return name;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornConsumeRecord.java
@@ -1,5 +1,7 @@
package com.yeshi.makemoney.app.entity.goldcorn;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.math.BigDecimal;
@@ -8,20 +10,25 @@
/**
 * @author hxh
 * @title: GoldCornRecord
 * @description: 金币记录
 * @description: 金币消费记录
 * @date 2022/3/31 18:25
 */
@Document(collection = "goldCornConsumeRecord")
public class GoldCornConsumeRecord {
    @Id
    private String id;
    @Indexed
    private Long uid;
    /**
     * 消耗金币数量
     */
    private Integer cornNum;
    /**
     * 兑换类型
     */
    @Indexed
    private GoldCornConsumeType type;
    /**
@@ -30,6 +37,76 @@
    private BigDecimal money;
    private String remarks;
    @Indexed
    private Date createTime;
    private Date updateTime;
    public  String toId() {
        return uid + "-" + type.name() + "-" + createTime.getTime();
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public Integer getCornNum() {
        return cornNum;
    }
    public void setCornNum(Integer cornNum) {
        this.cornNum = cornNum;
    }
    public GoldCornConsumeType getType() {
        return type;
    }
    public void setType(GoldCornConsumeType type) {
        this.type = type;
    }
    public BigDecimal getMoney() {
        return money;
    }
    public void setMoney(BigDecimal money) {
        this.money = money;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetFrequencyConfig.java
@@ -1,6 +1,8 @@
package com.yeshi.makemoney.app.entity.goldcorn;
import com.yeshi.makemoney.app.entity.SystemEnum;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
@@ -18,8 +20,11 @@
        hour, day, week, month, year
    }
    @Id
    private String id;
    @Indexed
    private SystemEnum system;
    @Indexed
    private GoldCornGetType type;
    /**
     * 限制的次数,配合单位使用,表示 每一个unit周期内limitCount次限制
@@ -29,9 +34,17 @@
     * 单位
     */
    private GoldCornGetFrequencyTimeUnit timeUnit;
    @Indexed
    private Date validateTime;
    private String remarks;
    private Date createTime;
    private Date updateTime;
    public  String toId() {
        return system.name()+"-"+type.name();
    }
    public String getId() {
        return id;
@@ -96,4 +109,12 @@
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetPrice.java
@@ -32,9 +32,18 @@
     */
    private Date validateTime;
    /**
     * 备注
     */
    private String remarks;
    private Date createTime;
    private Date updateTime;
    public String toId() {
        return system.name() + "-" + type.name()+"-"+createTime.getTime();
    }
    public String getId() {
@@ -92,4 +101,12 @@
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetRecord.java
@@ -1,5 +1,6 @@
package com.yeshi.makemoney.app.entity.goldcorn;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
@@ -8,11 +9,12 @@
/**
 * @author hxh
 * @title: GoldCornRecord
 * @description: 金币记录
 * @description: 金币获得记录
 * @date 2022/3/31 18:25
 */
@Document(collection = "goldCornRecord")
@Document(collection = "goldCornGetRecord")
public class GoldCornGetRecord {
    @Id
    private String id;
    @Indexed
    private Long uid;
@@ -26,9 +28,101 @@
    @Indexed
    private Long fromUid;
    /**
     * 缘由事件ID(当有二级分销时存在)
     **/
    @Indexed
    private String fromId;
    @Indexed
    private GoldCornGetType type;
    private String remarks;
    @Indexed
    private Date createTime;
    private Date updateTime;
    public String toId() {
        return uid + "-" + type.name() + "-" + createTime.getTime();
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public String getDay() {
        return day;
    }
    public void setDay(String day) {
        this.day = day;
    }
    public Integer getCornNum() {
        return cornNum;
    }
    public void setCornNum(Integer cornNum) {
        this.cornNum = cornNum;
    }
    public Long getFromUid() {
        return fromUid;
    }
    public void setFromUid(Long fromUid) {
        this.fromUid = fromUid;
    }
    public String getFromId() {
        return fromId;
    }
    public void setFromId(String fromId) {
        this.fromId = fromId;
    }
    public GoldCornGetType getType() {
        return type;
    }
    public void setType(GoldCornGetType type) {
        this.type = type;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornMoneyExchangeRateRecord.java
@@ -2,6 +2,7 @@
import com.yeshi.makemoney.app.entity.SystemEnum;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.math.BigDecimal;
@@ -17,25 +18,38 @@
public class GoldCornMoneyExchangeRateRecord {
    @Id
    private Long id;
    private String id;
    /**
     * 日期:格式为yyyy-MM-dd
     */
    @Indexed
    private String day;
    @Indexed
    private SystemEnum system;
    /**
     * 汇率:1金币兑换的人民币
     */
    private BigDecimal rate;
    /**
     * 汇率生效时间
     */
    private Date validateTime;
    private Date createTime;
    private Date updateTime;
    public  String toId() {
        return system.name() + "-" + day;
    }
    public Long getId() {
    public String getId() {
        return id;
    }
    public void setId(Long id) {
    public void setId(String id) {
        this.id = id;
    }
@@ -78,4 +92,12 @@
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Date getValidateTime() {
        return validateTime;
    }
    public void setValidateTime(Date validateTime) {
        this.validateTime = validateTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/msg/AppPageNotifyMsg.java
New file
@@ -0,0 +1,172 @@
package com.yeshi.makemoney.app.entity.msg;
import com.yeshi.makemoney.app.entity.SystemEnum;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
/**
 * @author hxh
 * @title: AppPageNotifyMsg
 * @description: 应用页面的通知消息
 * @date 2022/4/2 14:44
 */
@Document(collection = "appPageNotifyMsg")
public class AppPageNotifyMsg {
    public enum AppPageNotifyMsgType {
    }
    @Id
    private String id;
    @Indexed
    private SystemEnum system;
    @Indexed
    private AppPageNotifyMsgType type;
    /**
     * 是否显示
     **/
    @Indexed
    private Boolean show;
    /**
     * 是否可以关闭
     **/
    private Boolean canClose;
    /**
     * 内容
     **/
    private String content;
    /**
     * 链接
     **/
    private String contentUrl;
    /**
     * type+内容+链接的md5
     **/
    private String md5;
    /**
     * 开始时间
     **/
    @Indexed
    private Date startTime;
    /**
     * 结束时间
     **/
    @Indexed
    private Date endTime;
    private Date createTime;
    private Date updateTime;
    public String toId() {
        return system.name() + "-" + type.name();
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public SystemEnum getSystem() {
        return system;
    }
    public void setSystem(SystemEnum system) {
        this.system = system;
    }
    public AppPageNotifyMsgType getType() {
        return type;
    }
    public void setType(AppPageNotifyMsgType type) {
        this.type = type;
    }
    public Boolean getShow() {
        return show;
    }
    public void setShow(Boolean show) {
        this.show = show;
    }
    public Boolean getCanClose() {
        return canClose;
    }
    public void setCanClose(Boolean canClose) {
        this.canClose = canClose;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getContentUrl() {
        return contentUrl;
    }
    public void setContentUrl(String contentUrl) {
        this.contentUrl = contentUrl;
    }
    public String getMd5() {
        return md5;
    }
    public void setMd5(String md5) {
        this.md5 = md5;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/entity/user/UserExtraInfo.java
New file
@@ -0,0 +1,34 @@
package com.yeshi.makemoney.app.entity.user;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
/**
 * @author hxh
 * @title: UserExtraInfo
 * @description: 附加信息
 * @date 2022/4/2 14:14
 */
@Document(collection = "userExtraInfo")
public class UserExtraInfo {
    @Id
    private Long id;
    /**
     * 邀请码
     **/
    @Indexed
    private String inviteCode;
    private Date createTime;
    private Date updateTime;
}
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornConsumeRecordException.java
New file
@@ -0,0 +1,11 @@
package com.yeshi.makemoney.app.exception.goldcorn;
import com.ks.lib.common.exception.BaseException;
public class GoldCornConsumeRecordException extends BaseException {
    public GoldCornConsumeRecordException(int code, String msg) {
        super(code, msg);
    }
}
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornException.java
@@ -1,6 +1,8 @@
package com.yeshi.makemoney.app.exception.goldcorn;
public class GoldCornException extends Exception {
import com.ks.lib.common.exception.BaseException;
public class GoldCornException extends BaseException {
    private int code;
    private String msg;
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetFrequencyConfigException.java
New file
@@ -0,0 +1,13 @@
package com.yeshi.makemoney.app.exception.goldcorn;
import com.ks.lib.common.exception.BaseException;
import java.lang.Exception;
public class GoldCornGetFrequencyConfigException extends BaseException {
    public GoldCornGetFrequencyConfigException(int code, String msg) {
        super(code, msg);
    }
}
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetPriceException.java
New file
@@ -0,0 +1,11 @@
package com.yeshi.makemoney.app.exception.goldcorn;
import com.ks.lib.common.exception.BaseException;
public class GoldCornGetPriceException extends BaseException {
    public GoldCornGetPriceException(int code, String msg) {
        super(code, msg);
    }
}
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornGetRecordException.java
New file
@@ -0,0 +1,11 @@
package com.yeshi.makemoney.app.exception.goldcorn;
import com.ks.lib.common.exception.BaseException;
public class GoldCornGetRecordException extends BaseException {
    public GoldCornGetRecordException(int code, String msg) {
        super(code, msg);
    }
}
app/src/main/java/com/yeshi/makemoney/app/exception/goldcorn/GoldCornMoneyExchangeRateRecordException.java
New file
@@ -0,0 +1,11 @@
package com.yeshi.makemoney.app.exception.goldcorn;
import com.ks.lib.common.exception.BaseException;
public class GoldCornMoneyExchangeRateRecordException extends BaseException {
    public GoldCornMoneyExchangeRateRecordException(int code, String msg) {
        super(code, msg);
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/impl/config/SystemConfigServiceImpl.java
@@ -5,15 +5,18 @@
import com.yeshi.makemoney.app.entity.SystemEnum;
import com.yeshi.makemoney.app.entity.config.SystemConfig;
import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
import com.yeshi.makemoney.app.entity.config.SystemConfigType;
import com.yeshi.makemoney.app.service.inter.config.SystemConfigService;
import com.yeshi.makemoney.app.service.query.config.SystemConfigQuery;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.yeshi.utils.StringUtil;
import org.yeshi.utils.bean.BeanUtil;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -62,6 +65,23 @@
    }
    @Override
    public List<SystemConfig> listByType(SystemConfigType type) {
        List<SystemConfigKey> keyList = new ArrayList<>();
        for (SystemConfigKey key : SystemConfigKey.values()) {
            if (key.getType() == type) {
                keyList.add(key);
            }
        }
        DaoQuery daoQuery = new DaoQuery();
        daoQuery.keyList = keyList;
        daoQuery.start = 0;
        daoQuery.count = keyList.size();
        return systemConfigDao.list(daoQuery);
    }
    @Override
    public SystemConfig get(String id) {
        Query query = new Query();
        query.addCriteria(Criteria.where("_id").is(id));
@@ -75,6 +95,10 @@
            systemConfig.setId(systemConfig.getSystem().name() + "-" + systemConfig.getKey().name());
        }
        if (StringUtil.isNullOrEmpty(systemConfig.getName())) {
            systemConfig.setName(systemConfig.getKey().getDesc());
        }
        //查询主键ID是否存在
        if (systemConfigDao.get(systemConfig.getId()) != null) {
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornConsumeRecordServiceImpl.java
New file
@@ -0,0 +1,86 @@
package com.yeshi.makemoney.app.service.impl.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornConsumeRecordDao;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornConsumeRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornConsumeRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornConsumeRecordQuery;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornConsumeRecordDao.DaoQuery;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@Service
public class GoldCornConsumeRecordServiceImpl implements GoldCornConsumeRecordService{
  @Resource
  private GoldCornConsumeRecordDao goldCornConsumeRecordDao;
  @Override
  public List<GoldCornConsumeRecord> list(GoldCornConsumeRecordQuery goldCornConsumeRecordQuery, int page, int pageSize)  {
    DaoQuery daoQuery = new DaoQuery();
    try {
        BeanUtil.copyProperties(goldCornConsumeRecordQuery, daoQuery);
    } catch (IllegalAccessException e) {
          e.printStackTrace();
    }
    daoQuery.start=(page-1)*pageSize;
    daoQuery.count=pageSize;
    return goldCornConsumeRecordDao.list(daoQuery);
  }
  @Override
  public long count(GoldCornConsumeRecordQuery goldCornConsumeRecordQuery)  {
    DaoQuery daoQuery = new DaoQuery();
    try {
        BeanUtil.copyProperties(goldCornConsumeRecordQuery, daoQuery);
    } catch (IllegalAccessException e) {
          e.printStackTrace();
    }
    return goldCornConsumeRecordDao.count(daoQuery);
  }
  @Override
  public GoldCornConsumeRecord get(String id)  {
    Query query=new Query();
    query.addCriteria(Criteria.where("_id").is(id));
    return goldCornConsumeRecordDao.findOne(query);
  }
  @Override
  public void add(GoldCornConsumeRecord goldCornConsumeRecord)  throws Exception {
     //查询主键ID是否存在
     if(goldCornConsumeRecordDao.get(goldCornConsumeRecord.getId())!=null){
        throw new Exception("已存在");
     }
     if(goldCornConsumeRecord.getCreateTime()==null){
        goldCornConsumeRecord.setCreateTime(new Date());
     }
     //保存
     goldCornConsumeRecordDao.save(goldCornConsumeRecord);
  }
  @Override
  public void update(GoldCornConsumeRecord goldCornConsumeRecord)  {
     if(goldCornConsumeRecord.getUpdateTime()==null){
        goldCornConsumeRecord.setUpdateTime(new Date());
     }
     //更新
     goldCornConsumeRecordDao.updateSelective(goldCornConsumeRecord);
  }
  @Override
  public void delete(List<String> idList)  {
     for (String id : idList){
        goldCornConsumeRecordDao.delete(id);
     }
  }
}
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetFrequencyConfigServiceImpl.java
New file
@@ -0,0 +1,86 @@
package com.yeshi.makemoney.app.service.impl.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetFrequencyConfigDao;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetFrequencyConfig;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetFrequencyConfigService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetFrequencyConfigQuery;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetFrequencyConfigDao.DaoQuery;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@Service
public class GoldCornGetFrequencyConfigServiceImpl implements GoldCornGetFrequencyConfigService{
  @Resource
  private GoldCornGetFrequencyConfigDao goldCornGetFrequencyConfigDao;
  @Override
  public List<GoldCornGetFrequencyConfig> list(GoldCornGetFrequencyConfigQuery goldCornGetFrequencyConfigQuery, int page, int pageSize)  {
    DaoQuery daoQuery = new DaoQuery();
    try {
        BeanUtil.copyProperties(goldCornGetFrequencyConfigQuery, daoQuery);
    } catch (IllegalAccessException e) {
          e.printStackTrace();
    }
    daoQuery.start=(page-1)*pageSize;
    daoQuery.count=pageSize;
    return goldCornGetFrequencyConfigDao.list(daoQuery);
  }
  @Override
  public long count(GoldCornGetFrequencyConfigQuery goldCornGetFrequencyConfigQuery)  {
    DaoQuery daoQuery = new DaoQuery();
    try {
        BeanUtil.copyProperties(goldCornGetFrequencyConfigQuery, daoQuery);
    } catch (IllegalAccessException e) {
          e.printStackTrace();
    }
    return goldCornGetFrequencyConfigDao.count(daoQuery);
  }
  @Override
  public GoldCornGetFrequencyConfig get(String id)  {
    Query query=new Query();
    query.addCriteria(Criteria.where("_id").is(id));
    return goldCornGetFrequencyConfigDao.findOne(query);
  }
  @Override
  public void add(GoldCornGetFrequencyConfig goldCornGetFrequencyConfig)  throws Exception {
     //查询主键ID是否存在
     if(goldCornGetFrequencyConfigDao.get(goldCornGetFrequencyConfig.getId())!=null){
        throw new Exception("已存在");
     }
     if(goldCornGetFrequencyConfig.getCreateTime()==null){
        goldCornGetFrequencyConfig.setCreateTime(new Date());
     }
     //保存
     goldCornGetFrequencyConfigDao.save(goldCornGetFrequencyConfig);
  }
  @Override
  public void update(GoldCornGetFrequencyConfig goldCornGetFrequencyConfig)  {
     if(goldCornGetFrequencyConfig.getUpdateTime()==null){
        goldCornGetFrequencyConfig.setUpdateTime(new Date());
     }
     //更新
     goldCornGetFrequencyConfigDao.updateSelective(goldCornGetFrequencyConfig);
  }
  @Override
  public void delete(List<String> idList)  {
     for (String id : idList){
        goldCornGetFrequencyConfigDao.delete(id);
     }
  }
}
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetPriceServiceImpl.java
New file
@@ -0,0 +1,105 @@
package com.yeshi.makemoney.app.service.impl.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
import org.yeshi.utils.StringUtil;
import org.yeshi.utils.TimeUtil;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetPriceDao;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetPriceService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetPriceQuery;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetPriceDao.DaoQuery;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@Service
public class GoldCornGetPriceServiceImpl implements GoldCornGetPriceService {
    @Resource
    private GoldCornGetPriceDao goldCornGetPriceDao;
    @Override
    public List<GoldCornGetPrice> list(GoldCornGetPriceQuery goldCornGetPriceQuery, int page, int pageSize) {
        DaoQuery daoQuery = new DaoQuery();
        daoQuery.type = goldCornGetPriceQuery.getType();
        if (!StringUtil.isNullOrEmpty(goldCornGetPriceQuery.getStartTime())) {
            daoQuery.minValidateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetPriceQuery.getStartTime(), "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(goldCornGetPriceQuery.getEndTime())) {
            daoQuery.maxValidateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetPriceQuery.getEndTime(), "yyyy-MM-dd") + 1000 * 60 * 60 * 24L);
        }
        daoQuery.start = (page - 1) * pageSize;
        daoQuery.count = pageSize;
        return goldCornGetPriceDao.list(daoQuery);
    }
    @Override
    public long count(GoldCornGetPriceQuery goldCornGetPriceQuery) {
        DaoQuery daoQuery = new DaoQuery();
        daoQuery.type = goldCornGetPriceQuery.getType();
        if (!StringUtil.isNullOrEmpty(goldCornGetPriceQuery.getStartTime())) {
            daoQuery.minValidateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetPriceQuery.getStartTime(), "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(goldCornGetPriceQuery.getEndTime())) {
            daoQuery.maxValidateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetPriceQuery.getEndTime(), "yyyy-MM-dd") + 1000 * 60 * 60 * 24L);
        }
        return goldCornGetPriceDao.count(daoQuery);
    }
    @Override
    public GoldCornGetPrice get(String id) {
        Query query = new Query();
        query.addCriteria(Criteria.where("_id").is(id));
        return goldCornGetPriceDao.findOne(query);
    }
    @Override
    public void add(GoldCornGetPrice goldCornGetPrice) throws Exception {
        if (goldCornGetPrice.getCreateTime() == null) {
            goldCornGetPrice.setCreateTime(new Date());
        }
        if (goldCornGetPrice.getId() == null) {
            goldCornGetPrice.setId(goldCornGetPrice.toId());
        }
        //查询主键ID是否存在
        if (goldCornGetPriceDao.get(goldCornGetPrice.getId()) != null) {
            throw new Exception("已存在");
        }
        //保存
        goldCornGetPriceDao.save(goldCornGetPrice);
    }
    @Override
    public void update(GoldCornGetPrice goldCornGetPrice) {
        if (goldCornGetPrice.getUpdateTime() == null) {
            goldCornGetPrice.setUpdateTime(new Date());
        }
        //更新
        goldCornGetPriceDao.updateSelective(goldCornGetPrice);
    }
    @Override
    public void delete(List<String> idList) {
        for (String id : idList) {
            goldCornGetPriceDao.delete(id);
        }
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornGetRecordServiceImpl.java
New file
@@ -0,0 +1,103 @@
package com.yeshi.makemoney.app.service.impl.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
import org.yeshi.utils.StringUtil;
import org.yeshi.utils.TimeUtil;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetRecordDao;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetRecordQuery;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornGetRecordDao.DaoQuery;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@Service
public class GoldCornGetRecordServiceImpl implements GoldCornGetRecordService {
    @Resource
    private GoldCornGetRecordDao goldCornGetRecordDao;
    @Override
    public List<GoldCornGetRecord> list(GoldCornGetRecordQuery goldCornGetRecordQuery, int page, int pageSize) {
        DaoQuery daoQuery = new DaoQuery();
        daoQuery.type = goldCornGetRecordQuery.getType();
        daoQuery.uid = goldCornGetRecordQuery.getUid();
        if (!StringUtil.isNullOrEmpty(goldCornGetRecordQuery.getStartTime())) {
            daoQuery.minCreateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetRecordQuery.getStartTime(), "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(goldCornGetRecordQuery.getEndTime())) {
            daoQuery.maxCreateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetRecordQuery.getEndTime(), "yyyy-MM-dd"));
        }
        daoQuery.start = (page - 1) * pageSize;
        daoQuery.count = pageSize;
        return goldCornGetRecordDao.list(daoQuery);
    }
    @Override
    public long count(GoldCornGetRecordQuery goldCornGetRecordQuery) {
        DaoQuery daoQuery = new DaoQuery();
        daoQuery.type = goldCornGetRecordQuery.getType();
        daoQuery.uid = goldCornGetRecordQuery.getUid();
        if (!StringUtil.isNullOrEmpty(goldCornGetRecordQuery.getStartTime())) {
            daoQuery.minCreateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetRecordQuery.getStartTime(), "yyyy-MM-dd"));
        }
        if (!StringUtil.isNullOrEmpty(goldCornGetRecordQuery.getEndTime())) {
            daoQuery.maxCreateTime = new Date(TimeUtil.convertToTimeTemp(goldCornGetRecordQuery.getEndTime(), "yyyy-MM-dd"));
        }
        return goldCornGetRecordDao.count(daoQuery);
    }
    @Override
    public GoldCornGetRecord get(String id) {
        Query query = new Query();
        query.addCriteria(Criteria.where("_id").is(id));
        return goldCornGetRecordDao.findOne(query);
    }
    @Override
    public void add(GoldCornGetRecord goldCornGetRecord) throws Exception {
        //查询主键ID是否存在
        if (goldCornGetRecordDao.get(goldCornGetRecord.getId()) != null) {
            throw new Exception("已存在");
        }
        if (goldCornGetRecord.getCreateTime() == null) {
            goldCornGetRecord.setCreateTime(new Date());
        }
        //保存
        goldCornGetRecordDao.save(goldCornGetRecord);
    }
    @Override
    public void update(GoldCornGetRecord goldCornGetRecord) {
        if (goldCornGetRecord.getUpdateTime() == null) {
            goldCornGetRecord.setUpdateTime(new Date());
        }
        //更新
        goldCornGetRecordDao.updateSelective(goldCornGetRecord);
    }
    @Override
    public void delete(List<String> idList) {
        for (String id : idList) {
            goldCornGetRecordDao.delete(id);
        }
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMoneyExchangeRateRecordServiceImpl.java
New file
@@ -0,0 +1,99 @@
package com.yeshi.makemoney.app.service.impl.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornMoneyExchangeRateRecordDao;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornMoneyExchangeRateRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornMoneyExchangeRateRecordQuery;
import com.yeshi.makemoney.app.dao.goldcorn.GoldCornMoneyExchangeRateRecordDao.DaoQuery;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@Service
public class GoldCornMoneyExchangeRateRecordServiceImpl implements GoldCornMoneyExchangeRateRecordService {
    @Resource
    private GoldCornMoneyExchangeRateRecordDao goldCornMoneyExchangeRateRecordDao;
    @Override
    public List<GoldCornMoneyExchangeRateRecord> list(GoldCornMoneyExchangeRateRecordQuery goldCornMoneyExchangeRateRecordQuery, int page, int pageSize) {
        DaoQuery daoQuery = new DaoQuery();
        try {
            BeanUtil.copyProperties(goldCornMoneyExchangeRateRecordQuery, daoQuery);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        daoQuery.start = (page - 1) * pageSize;
        daoQuery.count = pageSize;
        return goldCornMoneyExchangeRateRecordDao.list(daoQuery);
    }
    @Override
    public long count(GoldCornMoneyExchangeRateRecordQuery goldCornMoneyExchangeRateRecordQuery) {
        DaoQuery daoQuery = new DaoQuery();
        try {
            BeanUtil.copyProperties(goldCornMoneyExchangeRateRecordQuery, daoQuery);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return goldCornMoneyExchangeRateRecordDao.count(daoQuery);
    }
    @Override
    public GoldCornMoneyExchangeRateRecord get(String id) {
        Query query = new Query();
        query.addCriteria(Criteria.where("_id").is(id));
        return goldCornMoneyExchangeRateRecordDao.findOne(query);
    }
    @Override
    public void add(GoldCornMoneyExchangeRateRecord goldCornMoneyExchangeRateRecord) throws Exception {
        if (goldCornMoneyExchangeRateRecord.getCreateTime() == null) {
            goldCornMoneyExchangeRateRecord.setCreateTime(new Date());
        }
        if (goldCornMoneyExchangeRateRecord.getId() == null) {
            goldCornMoneyExchangeRateRecord.setId(goldCornMoneyExchangeRateRecord.toId());
        }
        //查询主键ID是否存在
        if (goldCornMoneyExchangeRateRecordDao.get(goldCornMoneyExchangeRateRecord.getId()) != null) {
            throw new Exception("已存在");
        }
        //保存
        goldCornMoneyExchangeRateRecordDao.save(goldCornMoneyExchangeRateRecord);
    }
    @Override
    public void update(GoldCornMoneyExchangeRateRecord goldCornMoneyExchangeRateRecord) {
        if (goldCornMoneyExchangeRateRecord.getUpdateTime() == null) {
            goldCornMoneyExchangeRateRecord.setUpdateTime(new Date());
        }
        //更新
        goldCornMoneyExchangeRateRecordDao.updateSelective(goldCornMoneyExchangeRateRecord);
    }
    @Override
    public void delete(List<String> idList) {
        for (String id : idList) {
            goldCornMoneyExchangeRateRecordDao.delete(id);
        }
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/config/SystemConfigService.java
@@ -6,8 +6,11 @@
import com.yeshi.makemoney.app.entity.SystemEnum;
import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
import com.yeshi.makemoney.app.entity.config.SystemConfigType;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.config.SystemConfig;
import com.yeshi.makemoney.app.service.inter.config.SystemConfigService;
import com.yeshi.makemoney.app.service.query.config.SystemConfigQuery;
@@ -16,56 +19,58 @@
public interface SystemConfigService {
    /**
     * @author hxh
     * @description 获取缓存值
     * @date 11:50 2021/11/16
     * @param: system
     * @param: key
     * @return java.lang.String
     **/
    public String getValueCache(SystemEnum system, SystemConfigKey key);
    /**
     * @return java.lang.String
     * @author hxh
     * @description 获取缓存值
     * @date 11:50 2021/11/16
     * @param: system
     * @param: key
     **/
    public String getValueCache(SystemEnum system, SystemConfigKey key);
    /**
     * 获取列表
     * @param systemConfigQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<SystemConfig> list(SystemConfigQuery systemConfigQuery, int page, int pageSize) ;
     * 获取列表
     *
     * @param systemConfigQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<SystemConfig> list(SystemConfigQuery systemConfigQuery, int page, int pageSize);
    /**
     *
     */
    public long count(SystemConfigQuery systemConfigQuery) ;
     *
     */
    public long count(SystemConfigQuery systemConfigQuery);
    public List<SystemConfig> listByType(SystemConfigType type);
    /**
     *
     */
    public SystemConfig get(String id) ;
     *
     */
    public SystemConfig get(String id);
    /**
     *
     */
    public void add(SystemConfig systemConfig)  throws Exception;
     *
     */
    public void add(SystemConfig systemConfig) throws Exception;
    public void save(SystemConfig config);
    public void save(SystemConfig config);
    /**
     *
     */
    public void update(SystemConfig systemConfig) ;
     *
     */
    public void update(SystemConfig systemConfig);
    /**
     *
     */
    public void delete(List<String> idList) ;
     *
     */
    public void delete(List<String> idList);
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornConsumeRecordService.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.makemoney.app.service.inter.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornConsumeRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornConsumeRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornConsumeRecordQuery;
public interface GoldCornConsumeRecordService {
    /**
     * 获取列表
     * @param goldCornConsumeRecordQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<GoldCornConsumeRecord> list(GoldCornConsumeRecordQuery goldCornConsumeRecordQuery, int page, int pageSize) ;
    /**
     *
     */
    public long count(GoldCornConsumeRecordQuery goldCornConsumeRecordQuery) ;
    /**
     *
     */
    public GoldCornConsumeRecord get(String id) ;
    /**
     *
     */
    public void add(GoldCornConsumeRecord goldCornConsumeRecord)  throws Exception;
    /**
     *
     */
    public void update(GoldCornConsumeRecord goldCornConsumeRecord) ;
    /**
     *
     */
    public void delete(List<String> idList) ;
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetFrequencyConfigService.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.makemoney.app.service.inter.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetFrequencyConfig;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetFrequencyConfigService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetFrequencyConfigQuery;
public interface GoldCornGetFrequencyConfigService {
    /**
     * 获取列表
     * @param goldCornGetFrequencyConfigQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<GoldCornGetFrequencyConfig> list(GoldCornGetFrequencyConfigQuery goldCornGetFrequencyConfigQuery, int page, int pageSize) ;
    /**
     *
     */
    public long count(GoldCornGetFrequencyConfigQuery goldCornGetFrequencyConfigQuery) ;
    /**
     *
     */
    public GoldCornGetFrequencyConfig get(String id) ;
    /**
     *
     */
    public void add(GoldCornGetFrequencyConfig goldCornGetFrequencyConfig)  throws Exception;
    /**
     *
     */
    public void update(GoldCornGetFrequencyConfig goldCornGetFrequencyConfig) ;
    /**
     *
     */
    public void delete(List<String> idList) ;
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetPriceService.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.makemoney.app.service.inter.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetPriceService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetPriceQuery;
public interface GoldCornGetPriceService {
    /**
     * 获取列表
     * @param goldCornGetPriceQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<GoldCornGetPrice> list(GoldCornGetPriceQuery goldCornGetPriceQuery, int page, int pageSize) ;
    /**
     *
     */
    public long count(GoldCornGetPriceQuery goldCornGetPriceQuery) ;
    /**
     *
     */
    public GoldCornGetPrice get(String id) ;
    /**
     *
     */
    public void add(GoldCornGetPrice goldCornGetPrice)  throws Exception;
    /**
     *
     */
    public void update(GoldCornGetPrice goldCornGetPrice) ;
    /**
     *
     */
    public void delete(List<String> idList) ;
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornGetRecordService.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.makemoney.app.service.inter.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornGetRecordQuery;
public interface GoldCornGetRecordService {
    /**
     * 获取列表
     * @param goldCornGetRecordQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<GoldCornGetRecord> list(GoldCornGetRecordQuery goldCornGetRecordQuery, int page, int pageSize) ;
    /**
     *
     */
    public long count(GoldCornGetRecordQuery goldCornGetRecordQuery) ;
    /**
     *
     */
    public GoldCornGetRecord get(String id) ;
    /**
     *
     */
    public void add(GoldCornGetRecord goldCornGetRecord)  throws Exception;
    /**
     *
     */
    public void update(GoldCornGetRecord goldCornGetRecord) ;
    /**
     *
     */
    public void delete(List<String> idList) ;
}
app/src/main/java/com/yeshi/makemoney/app/service/inter/goldcorn/GoldCornMoneyExchangeRateRecordService.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.makemoney.app.service.inter.goldcorn;
import java.lang.Exception;
import javax.annotation.Resource;
import java.util.Date;
import org.yeshi.utils.bean.BeanUtil;
import java.util.List;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornMoneyExchangeRateRecordService;
import com.yeshi.makemoney.app.service.query.goldcorn.GoldCornMoneyExchangeRateRecordQuery;
public interface GoldCornMoneyExchangeRateRecordService {
    /**
     * 获取列表
     * @param goldCornMoneyExchangeRateRecordQuery
     * @param page
     * @param pageSize
     * @return
     */
    public List<GoldCornMoneyExchangeRateRecord> list(GoldCornMoneyExchangeRateRecordQuery goldCornMoneyExchangeRateRecordQuery, int page, int pageSize) ;
    /**
     *
     */
    public long count(GoldCornMoneyExchangeRateRecordQuery goldCornMoneyExchangeRateRecordQuery) ;
    /**
     *
     */
    public GoldCornMoneyExchangeRateRecord get(String id) ;
    /**
     *
     */
    public void add(GoldCornMoneyExchangeRateRecord goldCornMoneyExchangeRateRecord)  throws Exception;
    /**
     *
     */
    public void update(GoldCornMoneyExchangeRateRecord goldCornMoneyExchangeRateRecord) ;
    /**
     *
     */
    public void delete(List<String> idList) ;
}
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornConsumeRecordQuery.java
New file
@@ -0,0 +1,16 @@
package com.yeshi.makemoney.app.service.query.goldcorn;
public class GoldCornConsumeRecordQuery {
    //搜索关键词
    private String kw;
    private String getKw(){
        return kw;
    }
    private void setKw(String kw){
        this.kw = kw;
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetFrequencyConfigQuery.java
New file
@@ -0,0 +1,16 @@
package com.yeshi.makemoney.app.service.query.goldcorn;
public class GoldCornGetFrequencyConfigQuery {
    //搜索关键词
    private String kw;
    private String getKw(){
        return kw;
    }
    private void setKw(String kw){
        this.kw = kw;
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetPriceQuery.java
New file
@@ -0,0 +1,36 @@
package com.yeshi.makemoney.app.service.query.goldcorn;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
public class GoldCornGetPriceQuery {
    private GoldCornGetType type;
    private String startTime;
    private String endTime;
    public GoldCornGetType getType() {
        return type;
    }
    public void setType(GoldCornGetType type) {
        this.type = type;
    }
    public String getStartTime() {
        return startTime;
    }
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    public String getEndTime() {
        return endTime;
    }
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornGetRecordQuery.java
New file
@@ -0,0 +1,43 @@
package com.yeshi.makemoney.app.service.query.goldcorn;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
public class GoldCornGetRecordQuery {
    private String startTime;
    private String endTime;
    private GoldCornGetType type;
    private Long uid;
    public String getStartTime() {
        return startTime;
    }
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    public String getEndTime() {
        return endTime;
    }
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    public GoldCornGetType getType() {
        return type;
    }
    public void setType(GoldCornGetType type) {
        this.type = type;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
}
app/src/main/java/com/yeshi/makemoney/app/service/query/goldcorn/GoldCornMoneyExchangeRateRecordQuery.java
New file
@@ -0,0 +1,14 @@
package com.yeshi.makemoney.app.service.query.goldcorn;
public class GoldCornMoneyExchangeRateRecordQuery {
    private String day;
    public String getDay() {
        return day;
    }
    public void setDay(String day) {
        this.day = day;
    }
}
app/src/main/java/com/yeshi/makemoney/app/utils/factory/AppJumpParamsFactory.java
New file
@@ -0,0 +1,30 @@
package com.yeshi.makemoney.app.utils.factory;
import net.sf.json.JSONObject;
import org.yeshi.utils.StringUtil;
/**
 * @author hxh
 * @title: AppJumpParamsUtil
 * @description: 参数factory
 * @date 2022/4/2 14:27
 */
public class AppJumpParamsFactory {
    public static String createWeb(String url, String title) {
        JSONObject params = new JSONObject();
        params.put("url", url);
        if (!StringUtil.isNullOrEmpty(title)) {
            params.put("title", title);
        }
        return params.toString();
    }
    public static String createBaiChuan(String url) {
        JSONObject params = new JSONObject();
        params.put("url", url);
        return params.toString();
    }
}
app/src/main/java/com/yeshi/makemoney/app/vo/admin/goldcorn/GoldCornGetPriceAdminVO.java
New file
@@ -0,0 +1,85 @@
package com.yeshi.makemoney.app.vo.admin.goldcorn;
import com.yeshi.makemoney.app.entity.SystemEnum;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import org.yeshi.utils.TimeUtil;
import java.util.Date;
/**
 * @author hxh
 * @title: GoldCornGetPriceAdminVO
 * @description: TODO
 * @date 2022/4/2 17:42
 */
public class GoldCornGetPriceAdminVO {
    private String id;
    private GoldCornGetType type;
    private Integer cornNum;
    private String validateTime;
    private String remarks;
    public GoldCornGetPrice toEntity(SystemEnum system) {
        GoldCornGetPrice entity = new GoldCornGetPrice();
        entity.setCornNum(cornNum);
        entity.setId(id);
        entity.setRemarks(remarks);
        entity.setSystem(system);
        entity.setType(type);
        entity.setValidateTime(new Date(TimeUtil.convertToTimeTemp(validateTime, "yyyy-MM-dd HH:mm:ss")));
        return entity;
    }
    public static GoldCornGetPriceAdminVO create(GoldCornGetPrice entity) {
        GoldCornGetPriceAdminVO vo = new GoldCornGetPriceAdminVO();
        vo.setCornNum(entity.getCornNum());
        vo.setId(entity.getId());
        vo.setRemarks(entity.getRemarks());
        vo.setType(entity.getType());
        vo.setValidateTime(TimeUtil.getGernalTime(entity.getValidateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
        return vo;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public GoldCornGetType getType() {
        return type;
    }
    public void setType(GoldCornGetType type) {
        this.type = type;
    }
    public Integer getCornNum() {
        return cornNum;
    }
    public void setCornNum(Integer cornNum) {
        this.cornNum = cornNum;
    }
    public String getValidateTime() {
        return validateTime;
    }
    public void setValidateTime(String validateTime) {
        this.validateTime = validateTime;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
app/src/main/java/com/yeshi/makemoney/app/vo/admin/goldcorn/GoldCornMoneyExchangeRateAdminVO.java
New file
@@ -0,0 +1,73 @@
package com.yeshi.makemoney.app.vo.admin.goldcorn;
import com.yeshi.makemoney.app.entity.SystemEnum;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
import org.yeshi.utils.TimeUtil;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author hxh
 * @title: GoldCornMoneyExchangeRateAdminVO
 * @description:
 * @date 2022/4/2 16:42
 */
public class GoldCornMoneyExchangeRateAdminVO {
    private String id;
    private String day;
    private BigDecimal rate;
    private String validateTime;
    public GoldCornMoneyExchangeRateRecord toEntity(SystemEnum system) {
        GoldCornMoneyExchangeRateRecord record = new GoldCornMoneyExchangeRateRecord();
        record.setId(id);
        record.setValidateTime(new Date(TimeUtil.convertToTimeTemp(validateTime, "yyyy-MM-dd HH:mm:ss")));
        record.setSystem(system);
        record.setRate(rate);
        record.setDay(day);
        return record;
    }
    public static GoldCornMoneyExchangeRateAdminVO create(GoldCornMoneyExchangeRateRecord record) {
        GoldCornMoneyExchangeRateAdminVO vo = new GoldCornMoneyExchangeRateAdminVO();
        vo.setId(record.getId());
        vo.setValidateTime(TimeUtil.getGernalTime(record.getValidateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
        vo.setRate(record.getRate());
        vo.setDay(record.getDay());
        return vo;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getDay() {
        return day;
    }
    public void setDay(String day) {
        this.day = day;
    }
    public BigDecimal getRate() {
        return rate;
    }
    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }
    public String getValidateTime() {
        return validateTime;
    }
    public void setValidateTime(String validateTime) {
        this.validateTime = validateTime;
    }
}
app/src/main/resources/generator/backup.xml
File was deleted
app/src/main/resources/generator/full.xml
New file
@@ -0,0 +1,89 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE generator-config PUBLIC "-//yeshitv.com//DTD generator_code 1.0//EN"
        "http://dtd.yeshitv.com/generator_code/1.0.dtd">
<generator-config class="com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord">
    <dao package="com.yeshi.makemoney.app.dao.goldcorn">
        <queryList>
            <query name="system" type="equal"/>
            <query name="day" type="equal"/>
            <query name="validateTime" type="equal"/>
        </queryList>
    </dao>
    <service interPackage="com.yeshi.makemoney.app.service.inter.goldcorn"
             implPackage="com.yeshi.makemoney.app.service.impl.goldcorn"
             queryPackage="com.yeshi.makemoney.app.service.query.goldcorn">
        <exception package="com.yeshi.makemoney.app.exception.goldcorn"></exception>
    </service>
    <admin>
        <controller package="com.yeshi.makemoney.app.controller.admin.goldcorn"
                    mapping="admin/api/goldcorn/exchangerate"
                    jsonp="false">
        </controller>
        <pages title="金币兑换人民币汇率设置"
               pageDir="D:/workspace/makemoney/server/MakeMoney/app/src/main/resources/static/goldcorn">
            <list>
                <searchForm>
                    <columns>
                        <column property="day" title="日期">
                            <text inputType="DATE"></text>
                        </column>
                    </columns>
                </searchForm>
                <columns>
                    <column property="id" title="ID" showType="TEXT"></column>
                    <column property="day" title="日期" showType="TEXT"></column>
                    <column property="rate" title="汇率" showType="TEXT"></column>
                    <column property="validateTime" title="生效时间" showType="TEXT"></column>
                    <column property="createTime" title="创建时间" showType="TEXT"></column>
                    <column property="updateTime" title="修改时间" showType="TEXT"></column>
                </columns>
            </list>
            <add>
                <column property="type" title="日期">
                    <text inputType="DATE" dateFormat="yyyy-MM-dd">
                        <verify type="date" require="true"></verify>
                    </text>
                </column>
                <column property="rate" title="汇率">
                    <text inputType="TEXT" placeHolder="1金币兑换的人民币数量">
                        <verify type="number" require="true"></verify>
                    </text>
                </column>
                <column property="validateTime" title="汇率">
                    <text inputType="DATETIME" placeHolder="生效时间" dateFormat="yyyy-MM-dd HH:mm">
                        <verify type="date" require="true"></verify>
                    </text>
                </column>
            </add>
            <update>
                <column property="type" title="日期">
                    <text inputType="DATE" dateFormat="yyyy-MM-dd">
                        <verify type="date" require="true"></verify>
                    </text>
                </column>
                <column property="rate" title="汇率">
                    <text inputType="TEXT" placeHolder="1金币兑换的人民币数量">
                        <verify type="number" require="true"></verify>
                    </text>
                </column>
                <column property="validateTime" title="汇率">
                    <text inputType="DATETIME" placeHolder="生效时间" dateFormat="yyyy-MM-dd HH:mm">
                        <verify type="date" require="true"></verify>
                    </text>
                </column>
            </update>
        </pages>
    </admin>
</generator-config>
app/src/main/resources/generator/list.xml
New file
@@ -0,0 +1,68 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE generator-config PUBLIC "-//yeshitv.com//DTD generator_code 1.0//EN"
        "http://dtd.yeshitv.com/generator_code/1.0.dtd">
<generator-config class="com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord">
    <dao package="com.yeshi.makemoney.app.dao.goldcorn">
        <queryList>
            <query name="uid" type="equal"/>
            <query name="day" type="equal"/>
            <query name="fromUid" type="equal"/>
            <query name="fromId" type="equal"/>
            <query name="type" type="equal"/>
            <query name="createTime" type="equal"/>
        </queryList>
    </dao>
    <service interPackage="com.yeshi.makemoney.app.service.inter.goldcorn"
             implPackage="com.yeshi.makemoney.app.service.impl.goldcorn"
             queryPackage="com.yeshi.makemoney.app.service.query.goldcorn">
        <exception package="com.yeshi.makemoney.app.exception.goldcorn"></exception>
    </service>
    <admin>
        <controller package="com.yeshi.makemoney.app.controller.admin.goldcorn" mapping="admin/api/goldcorn/get/record" jsonp="false">
        </controller>
        <pages title="金币获得记录" pageDir="D:/workspace/makemoney/server/MakeMoney/app/src/main/resources/static/goldcorn">
            <list edit="false" delete="false">
                <searchForm>
                    <columns>
                        <column property="startTime" title="开始时间">
                            <text inputType="DATE"></text>
                        </column>
                        <column property="endTime" title="结束时间">
                            <text inputType="DATE"></text>
                        </column>
                        <column property="type" title="类型">
                            <select>
                                <api path="admin/api/goldcorn/get/record/getTypeList">
                                    <params>
                                        <value key="test">1</value>
                                    </params>
                                </api>
                                <verify type="none" require="true"></verify>
                            </select>
                        </column>
                        <column property="kw" title="关键词">
                            <text inputType="TEXT" placeHolder="请输入用户ID"></text>
                        </column>
                    </columns>
                </searchForm>
                <columns>
                    <column property="id" title="ID" showType="TEXT"></column>
                    <column property="type" title="类型" showType="TEXT"></column>
                    <column property="cornNum" title="金币数量" showType="TEXT"></column>
                    <column property="fromUid" title="缘由用户ID" showType="TEXT"></column>
                    <column property="remarks" title="备注" showType="TEXT"></column>
                    <column property="createTime" title="创建时间" showType="TEXT"></column>
                </columns>
            </list>
        </pages>
    </admin>
</generator-config>
app/src/main/resources/generator/team.xml
File was deleted
app/src/main/resources/mapper/ExtractMapper.xml
@@ -17,7 +17,7 @@
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <association property="user" column="uid" javaType="com.yeshi.makemoney.app.entity.user.UserInfo">
            <id column="id"></id>
            <id column="uid" property="id" jdbcType="BIGINT"></id>
        </association>
    </resultMap>
app/src/main/resources/mapper/UserMoneyRecordMapper.xml
@@ -5,7 +5,6 @@
    <resultMap id="BaseResultMap"
               type="com.yeshi.makemoney.app.entity.money.UserMoneyRecord">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="uid" property="user" jdbcType="VARCHAR"/>
        <result column="type" property="type" jdbcType="VARCHAR"/>
        <result column="serial_no" property="serialNo" jdbcType="VARCHAR"/>
        <result column="money" property="money" jdbcType="DECIMAL"/>
@@ -15,7 +14,7 @@
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <association property="user" column="uid" javaType="com.yeshi.makemoney.app.entity.user.UserInfo">
            <id column="id" property="id"></id>
            <id column="uid" property="id" jdbcType="BIGINT"></id>
        </association>
    </resultMap>
app/src/main/resources/static/config/system_config_add.html
@@ -26,42 +26,42 @@
    <div class="layui-row">
        <form class="layui-form" lay-filter="add">
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        名称</label>
                     <div class="layui-input-block">
                          <input type="text" name="name"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" lay-verify="" placeholder="" autocomplete="off"
                           class="layui-input">
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        关键字</label>
                     <div class="layui-input-block">
                          <input type="text" name="key"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    关键字</label>
                <div class="layui-input-block">
                    <select type="text" name="key" placeholder="" autocomplete="off"
                            class="layui-input"></select>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        内容</label>
                     <div class="layui-input-block">
                          <input type="text" name="value"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    内容</label>
                <div class="layui-input-block">
                    <input type="text" name="value" lay-verify="" placeholder="" autocomplete="off"
                           class="layui-input">
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        备注</label>
                     <div class="layui-input-block">
                          <input type="text" name="remarks"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    备注</label>
                <div class="layui-input-block">
                    <input type="text" name="remarks" lay-verify="" placeholder="" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
@@ -100,8 +100,8 @@
    layui.use(['form', 'layer', 'jquery', 'upload'], function () {
        $ = layui.jquery;
        var form = layui.form,
                layer = layui.layer,
                upload = layui.upload;
            layer = layui.layer,
            upload = layui.upload;
        var verify = {};
        //自定义验证规则
@@ -111,45 +111,64 @@
        uploadTool.init(upload);
        ksapp.postJSON('/admin/api/config/getKeyList', {}, function (res) {
            if (res.code == 0) {
                //填充数据
                $("select[name=key]").empty();
                for (var i = 0; i < res.data.length; i++) {
                    var html = "<option value='" + res.data[i].key + "'>";
                    html += res.data[i].value + "</option>";
                    $("select[name=key]").append(html);
                }
                //重新渲染表单
                form.render();
            } else {
                layer.msg(res.msg);
            }
        }, function (res) {
        });
        //监听提交
        form.on('submit(add)',
                function (data) {
                    console.log(data.field);
                    //转换json对象
                    for (key in data.field) {
                        if (key.indexOf(".") > -1) {
                            var value = data.field[key];
                            delete data.field[key];
                            var onkeys = key.split(".");
                            //创建对象
                            if (data.field[onkeys[0]] == undefined) {
                                data.field[onkeys[0]] = {};
                            }
                            data.field[onkeys[0]][onkeys[1]] = value;
            function (data) {
                console.log(data.field);
                //转换json对象
                for (key in data.field) {
                    if (key.indexOf(".") > -1) {
                        var value = data.field[key];
                        delete data.field[key];
                        var onkeys = key.split(".");
                        //创建对象
                        if (data.field[onkeys[0]] == undefined) {
                            data.field[onkeys[0]] = {};
                        }
                        data.field[onkeys[0]][onkeys[1]] = value;
                    }
                    uploadTool.upload(function(){
                        //发异步,把数据提交给php
                        ksapp.post('/admin/api/config/add', data.field, function (res) {
                            if (res.code == 0) {
                                layer.alert("增加成功", {
                                            icon: 6
                                        },
                                        function () {
                                            //关闭当前frame
                                            xadmin.close();
                                            // 可以对父窗口进行刷新
                                            // xadmin.father_reload();
                                        });
                            } else {
                                layer.msg(res.msg);
                            }
                }
                uploadTool.upload(function () {
                    //发异步,把数据提交给php
                    ksapp.post('/admin/api/config/add', data.field, function (res) {
                        if (res.code == 0) {
                            layer.alert("增加成功", {
                                    icon: 6
                                },
                                function () {
                                    //关闭当前frame
                                    xadmin.close();
                                    // 可以对父窗口进行刷新
                                    // xadmin.father_reload();
                                });
                        } else {
                            layer.msg(res.msg);
                        }
                        }, function (res) {
                        });
                    }, function (res) {
                    });
                    return false;
                });
                return false;
            });
        //请求select的数据API
    })
    ;
app/src/main/resources/static/goldcorn/gold_corn_consume_record_list.html
New file
@@ -0,0 +1,270 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>金币消耗记录列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../css/theme3049.min.css">
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="../js/utils.js"></script>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">###</a>
                <a>
                    <cite>###</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                          <input type="date" name="startTime"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                          <input type="date" name="endTime"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                          <select name="type" lay-verify="required">
                        </select>                        </div>
                        <div class="layui-inline layui-show-xs-block">
                          <input type="text" name="kw"  lay-verify=""  placeholder="请输入用户ID" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <button id="search" class="layui-btn" lay-submit="" lay-filter="search">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table" id="table_list" lay-filter="app">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
    </div>
</script>
<script type="text/html" id="optContainer">
    <div class="layui-btn-container">
    </div>
</script>
<script type="text/html" id="statusContainer">
    <div class="layui-btn-container">
        {{# if(d.status==0){ }}
        <span class="layui-btn layui-btn-mini">
            正常
        </span>
        {{# }else{ }}
        <span class="layui-btn layui-btn-danger layui-btn-mini">
             已删除
        </span>
        {{# } }}
    </div>
</script>
<script type="text/html" id="switchTpl">
    <!-- 这里的checked的状态只是演示 -->
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script type="text/html" id="imgshow">
    <!-- 这里的checked的状态只是演示 -->
    <img  src="{{d.}}"/>
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script>
</script>
<script>
    var tableIns = null;
    $(function () {
        var app = new Vue({
            el: "#app",
            data: {
                key: '',
                start: '',
                end: '',
                appList: []
            },
            watch: {},
            created: function () {
            },
            methods: {
                init: function () {
                    //初始化
                    layui.use(['laydate', 'form', 'table'], function () {
                        var laydate = layui.laydate,
                                form = layui.form,
                                table = layui.table;
                        //渲染日期输入框
                                laydate.render({
                                    elem: "intput[name=startTime]" //指定元素
                                });
                                laydate.render({
                                    elem: "intput[name=endTime]" //指定元素
                                });
                        //搜索条件
                        form.on('submit(search)', function (data) {
                            app.search(data.field);
                            return false;
                        });
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "/admin/api/goldcorn/consume/record/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
                                    {field: 'id', width: 120, sort: false, title: "ID"},
                                    {field: 'type', width: 120, sort: false, title: "类型"},
                                    {field: 'cornNum', width: 120, sort: false, title: "金币数量"},
                                    {field: 'money', width: 120, sort: false, title: "金额"},
                                    {field: 'remarks', width: 120, sort: false, title: "备注"},
                                    {field: 'createTime', width: 120, sort: false, title: "创建时间"},
                                {fixed: 'right', width: 80, title: "操作", toolbar: '#optContainer'}]],
                            page: true,
                            parseData: function (res) { //res 即为原始返回的数据
                                if (res.code != 0)
                                    return;
                                if (res.data.list == null)
                                    return;
                                console.log(res.data.list)
                                return {
                                    "code": res.code, //解析接口状态
                                    "msg": res.msg, //解析提示文本
                                    "count": res.data.count, //解析数据长度
                                    "data": res.data.list //解析数据列表
                                };
                            },
                            error: function (e, msg) {
                                ksapp.tableError(e)
                            }
                            //,…… //其他参数
                        });
                        //头工具栏事件
                        table.on('toolbar(app)',
                                function (obj) {
                                    var checkStatus = table.checkStatus(obj.config.id);
                                    switch (obj.event) {
                                        case 'delete':
                                            var data = checkStatus.data;
                                            if (data == null || data.length == 0) {
                                                layer.msg("未选择选项");
                                                return;
                                            }
                                            var ids = new Array();
                                            for (var i = 0; i < data.length; i++)
                                                ids.push(data[i].id);
                                            layer.confirm('确认要删除吗?', function (index) {
                                                //发异步删除数据
                                                app.deleteList(ids, function () {
                                                    layer.msg("删除成功");
                                                    $("form").submit();
                                                });
                                            });
                                            break;
                                    };
                                });
                        //请求搜索表单中需要的数据
                             var requestCount = 0;
                             requestCount++;
                             var params = {};
                         ksapp.post('/admin/api/goldcorn/consume/record/getTypeList', params, function (res) {
                             if (res.code == 0) {
                                 //填充数据
                                 $("select[name=type]").empty();
                                 for (var i = 0; i < res.data.length; i++) {
                                     var html = "<option value='" + res.data[i].key + "'>";
                                     html += res.data[i].value + "</option>";
                                     $("select[name=type]").append(html);
                                 }
                                 //重新渲染表单
                                 form.render();
                                 requestCount--;
                                 if (requestCount <= 0) {
                                     //搜索
                                     $('#search').trigger("click");
                                 }
                             } else {
                                 layer.msg(res.msg);
                             }
                         }, function (res) {
                         });
                    });
                },
                delete: function (obj, index, id) {
                    var ids = new Array();
                    ids.push(id);
                    app.deleteList(ids, function () {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    });
                },
                search: function (params) {
                    //数据重载
                    tableIns.reload({
                        where: params,
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                    });
                },
            }
    });
    app.init();
    });
</script>
<script>
</script>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_add.html
New file
@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>新增金币获得频率设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="add">
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        类型</label>
                     <div class="layui-input-block">
                          <select name="type" lay-verify="required">
                        </select>                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        限制时间单位</label>
                     <div class="layui-input-block">
                          <select name="timeUnit" lay-verify="required">
                        </select>                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        限制次数</label>
                     <div class="layui-input-block">
                          <input type="text" name="limitCount"  lay-verify="required|number"  placeholder="请输入金币数量" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        生效日期</label>
                     <div class="layui-input-block">
                          <input type="datetime" name="validateTime"  lay-verify="required|date"  placeholder="请选择生效时间" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        备注</label>
                     <div class="layui-input-block">
                          <input type="text" name="remarks"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="">确定</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload'], function () {
        $ = layui.jquery;
        var form = layui.form,
                layer = layui.layer,
                upload = layui.upload;
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //监听提交
        form.on('submit(add)',
                function (data) {
                    console.log(data.field);
                    //转换json对象
                    for (key in data.field) {
                        if (key.indexOf(".") > -1) {
                            var value = data.field[key];
                            delete data.field[key];
                            var onkeys = key.split(".");
                            //创建对象
                            if (data.field[onkeys[0]] == undefined) {
                                data.field[onkeys[0]] = {};
                            }
                            data.field[onkeys[0]][onkeys[1]] = value;
                        }
                    }
                    uploadTool.upload(function(){
                        //发异步,把数据提交给php
                        ksapp.post('/admin/api/goldcorn/get/config/add', data.field, function (res) {
                            if (res.code == 0) {
                                layer.alert("增加成功", {
                                            icon: 6
                                        },
                                        function () {
                                            //关闭当前frame
                                            xadmin.close();
                                            // 可以对父窗口进行刷新
                                            // xadmin.father_reload();
                                        });
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                    });
                    return false;
                });
        //请求select的数据API
             var params = {};
         ksapp.postJSON('/admin/api/goldcorn/get/config/getTypes', params, function (res) {
             if (res.code == 0) {
                 //填充数据
                 $("select[name=type]").empty();
                 for (var i = 0; i < res.data.length; i++) {
                     var html = "<option value='" + res.data[i].key + "'>";
                     html += res.data[i].value + "</option>";
                     $("select[name=type]").append(html);
                 }
                 //重新渲染表单
                 form.render();
             } else {
                 layer.msg(res.msg);
             }
         }, function (res) {
         });
             var params = {};
         ksapp.postJSON('/admin/api/goldcorn/get/config/getTimeUnits', params, function (res) {
             if (res.code == 0) {
                 //填充数据
                 $("select[name=timeUnit]").empty();
                 for (var i = 0; i < res.data.length; i++) {
                     var html = "<option value='" + res.data[i].key + "'>";
                     html += res.data[i].value + "</option>";
                     $("select[name=timeUnit]").append(html);
                 }
                 //重新渲染表单
                 form.render();
             } else {
                 layer.msg(res.msg);
             }
         }, function (res) {
         });
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_list.html
New file
@@ -0,0 +1,271 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>金币获得频率设置列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="./css/theme3049.min.css">
    <script src="./js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script src="./js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="./js/utils.js"></script>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">###</a>
                <a>
                    <cite>###</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                          <input type="date" name="startTime"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                          <input type="date" name="endTime"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                          <input type="text" name="kw"  lay-verify=""  placeholder="请输入用户ID" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <button id="search" class="layui-btn" lay-submit="" lay-filter="search">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table" id="table_list" lay-filter="app">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn" onclick="xadmin.open('添加金币获得频率设置','goldcorngetfrequencyconfig_add.html',500,580)"><i
                class="layui-icon"></i>添加
        </button>
        <button class="layui-btn layui-btn-danger" lay-event="delete">
            <i class="layui-icon">&#xe640;</i>
            删除
        </button>
    </div>
</script>
<script type="text/html" id="optContainer">
    <div class="layui-btn-container">
        <a title="修改" onclick="xadmin.open('修改金币获得频率设置','goldcorngetfrequencyconfig_update.html?id={{d.id}}',500,580)" href="javascript:;">
            <i class="layui-icon">&#xe642;</i>
        </a>
        <a title="删除" onclick="member_del(this,{{d.LAY_INDEX }},'{{d.id}}')" href="javascript:;">
            <i class="layui-icon">&#xe640;</i>
        </a>
    </div>
</script>
<script type="text/html" id="statusContainer">
    <div class="layui-btn-container">
        {{# if(d.status==0){ }}
        <span class="layui-btn layui-btn-mini">
            正常
        </span>
        {{# }else{ }}
        <span class="layui-btn layui-btn-danger layui-btn-mini">
             已删除
        </span>
        {{# } }}
    </div>
</script>
<script type="text/html" id="switchTpl">
    <!-- 这里的checked的状态只是演示 -->
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script type="text/html" id="imgshow">
    <!-- 这里的checked的状态只是演示 -->
    <img  src="{{d.}}"/>
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script>
    function member_del(obj, index, id) {
        layer.confirm('确认要删除吗?', function (index) {
            //发异步删除数据
            app.delete(obj, index, id);
        });
    }
</script>
<script>
    var tableIns = null;
    $(function () {
        var app = new Vue({
            el: "#app",
            data: {
                key: '',
                start: '',
                end: '',
                appList: []
            },
            watch: {},
            created: function () {
            },
            methods: {
                init: function () {
                    //初始化
                    layui.use(['laydate', 'form', 'table'], function () {
                        var laydate = layui.laydate,
                                form = layui.form,
                                table = layui.table;
                        //渲染日期输入框
                                laydate.render({
                                    elem: "intput[name=startTime]" //指定元素
                                });
                                laydate.render({
                                    elem: "intput[name=endTime]" //指定元素
                                });
                        //搜索条件
                        form.on('submit(search)', function (data) {
                            app.search(data.field);
                            return false;
                        });
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "/admin/api/goldcorn/get/config/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
                                    {field: 'id', width: 120, sort: false, title: "ID"},
                                    {field: 'type', width: 120, sort: false, title: "类型"},
                                    {field: 'limitCount', width: 120, sort: false, title: "限制次数"},
                                    {field: 'timeUnit', width: 120, sort: false, title: "限制单位"},
                                    {field: 'validateTime', width: 120, sort: false, title: "生效时间"},
                                    {field: 'remarks', width: 120, sort: false, title: "备注"},
                                    {field: 'createTime', width: 120, sort: false, title: "创建时间"},
                                    {field: 'updateTime', width: 120, sort: false, title: "修改时间"},
                                {fixed: 'right', width: 80, title: "操作", toolbar: '#optContainer'}]],
                            page: true,
                            parseData: function (res) { //res 即为原始返回的数据
                                if (res.code != 0)
                                    return;
                                if (res.data.list == null)
                                    return;
                                console.log(res.data.list)
                                return {
                                    "code": res.code, //解析接口状态
                                    "msg": res.msg, //解析提示文本
                                    "count": res.data.count, //解析数据长度
                                    "data": res.data.list //解析数据列表
                                };
                            },
                            error: function (e, msg) {
                                ksapp.tableError(e)
                            }
                            //,…… //其他参数
                        });
                        //头工具栏事件
                        table.on('toolbar(app)',
                                function (obj) {
                                    var checkStatus = table.checkStatus(obj.config.id);
                                    switch (obj.event) {
                                        case 'delete':
                                            var data = checkStatus.data;
                                            if (data == null || data.length == 0) {
                                                layer.msg("未选择选项");
                                                return;
                                            }
                                            var ids = new Array();
                                            for (var i = 0; i < data.length; i++)
                                                ids.push(data[i].id);
                                            layer.confirm('确认要删除吗?', function (index) {
                                                //发异步删除数据
                                                app.deleteList(ids, function () {
                                                    layer.msg("删除成功");
                                                    $("form").submit();
                                                });
                                            });
                                            break;
                                    };
                                });
                        //请求搜索表单中需要的数据
                          $('#search').trigger("click");
                    });
                },
                delete: function (obj, index, id) {
                    var ids = new Array();
                    ids.push(id);
                    app.deleteList(ids, function () {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.post("/admin/api/goldcorn/get/config/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {
                            layer.msg(e.msg);
                        }
                    }, function (e) {
                    });
                },
                search: function (params) {
                    //数据重载
                    tableIns.reload({
                        where: params,
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                    });
                },
            }
    });
    app.init();
    });
</script>
<script>
</script>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_frequency_config_update.html
New file
@@ -0,0 +1,249 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>修改金币获得频率设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="update">
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        类型</label>
                    <div class="layui-input-block">
                          <select name="type" lay-verify="required">
                        </select>                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        限制时间单位</label>
                    <div class="layui-input-block">
                          <select name="timeUnit" lay-verify="required">
                        </select>                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        限制次数</label>
                    <div class="layui-input-block">
                          <input type="text" name="limitCount"  lay-verify="required|number"  placeholder="请输入金币数量" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        生效日期</label>
                    <div class="layui-input-block">
                          <input type="datetime" name="validateTime"  lay-verify="required|date"  placeholder="请选择生效时间" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        备注</label>
                    <div class="layui-input-block">
                          <input type="text" name="remarks"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="update" lay-submit="">确定修改</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    //填充数据
    function fillData(form) {
        var id = ksapp.getQueryParam("id");
        if (id) {
        } else {
            layer.msg("id为空");
            return;
        }
        ksapp.post('/admin/api/goldcorn/get/config/get', {id: id}, function (res) {
            if (res.code == 0) {
                form.val("update",res.data);
            } else {
                layer.msg(res.msg);
            }
        }, function (res) {
            layer.msg("详情获取失败");
        });
    }
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload'], function () {
        $ = layui.jquery;
        var form = layui.form,
                layer = layui.layer,
                upload = layui.upload;
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //填充表单数据
        //请求数据
        //form.data();
        //监听提交
        form.on('submit(update)',
                function (data) {
                    console.log(data.field);
                    //转换json对象
                    for (key in data.field) {
                        if (key.indexOf(".") > -1) {
                            var value = data.field[key];
                            delete data.field[key];
                            var onkeys = key.split(".");
                            //创建对象
                            if (data.field[onkeys[0]] == undefined) {
                                data.field[onkeys[0]] = {};
                            }
                            data.field[onkeys[0]][onkeys[1]] = value;
                        }
                    }
                    uploadTool.upload(function () {
                        //发异步,把数据提交给php
                        var params = data.field;
                        params.id = ksapp.getQueryParam("id");
                        ksapp.post('/admin/api/goldcorn/get/config/update', data.field, function (res) {
                            if (res.code == 0) {
                                layer.alert("修改成功", {
                                            icon: 6
                                        },
                                        function () {
                                            //关闭当前frame
                                            xadmin.close();
                                            // 可以对父窗口进行刷新
                                            // xadmin.father_reload();
                                        });
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                    });
                    return false;
                });
        //请求select的数据API
             var preRequestCount = 2
             var params = {};
         ksapp.post('/admin/api/goldcorn/get/config/getTypes', params, function (res) {
             if (res.code == 0) {
                 //填充数据
                 $("select[name=type]").empty();
                 for (var i = 0; i < res.data.length; i++) {
                     var html = "<option value='" + res.data[i].key + "'>";
                     html += res.data[i].value + "</option>";
                     $("select[name=type]").append(html);
                 }
                 //重新渲染表单
                 form.render();
                 preRequestCount--;
                 if (preRequestCount <= 0) {
                     //开始填充数据
                     fillData(form)
                 }
             } else {
                 layer.msg(res.msg);
             }
         }, function (res) {
         });
             var params = {};
         ksapp.post('/admin/api/goldcorn/get/config/getTimeUnits', params, function (res) {
             if (res.code == 0) {
                 //填充数据
                 $("select[name=timeUnit]").empty();
                 for (var i = 0; i < res.data.length; i++) {
                     var html = "<option value='" + res.data[i].key + "'>";
                     html += res.data[i].value + "</option>";
                     $("select[name=timeUnit]").append(html);
                 }
                 //重新渲染表单
                 form.render();
                 preRequestCount--;
                 if (preRequestCount <= 0) {
                     //开始填充数据
                     fillData(form)
                 }
             } else {
                 layer.msg(res.msg);
             }
         }, function (res) {
         });
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_price_add.html
New file
@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>新增金币获取类型</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="add">
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    类型</label>
                <div class="layui-input-block">
                    <select name="type" lay-verify="required">
                    </select></div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    <span class="x-red">*</span>
                    金币数量</label>
                <div class="layui-input-block">
                    <input type="text" name="cornNum" lay-verify="required|number" placeholder="请输入金币数量"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    <span class="x-red">*</span>
                    生效日期</label>
                <div class="layui-input-block">
                    <input type="datetime" name="validateTime" id="validateTime" lay-verify="required|datetime"
                           placeholder="请选择生效时间" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="">确定</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload', 'laydate'], function () {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate,
            upload = layui.upload;
        laydate.render({
            elem: '#validateTime'
            , type: 'datetime'
        });
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //监听提交
        form.on('submit(add)',
            function (data) {
                console.log(data.field);
                //转换json对象
                for (key in data.field) {
                    if (key.indexOf(".") > -1) {
                        var value = data.field[key];
                        delete data.field[key];
                        var onkeys = key.split(".");
                        //创建对象
                        if (data.field[onkeys[0]] == undefined) {
                            data.field[onkeys[0]] = {};
                        }
                        data.field[onkeys[0]][onkeys[1]] = value;
                    }
                }
                uploadTool.upload(function () {
                    //发异步,把数据提交给php
                    ksapp.post('/admin/api/goldcorn/price/add', data.field, function (res) {
                        if (res.code == 0) {
                            layer.alert("增加成功", {
                                    icon: 6
                                },
                                function () {
                                    //关闭当前frame
                                    xadmin.close();
                                    // 可以对父窗口进行刷新
                                    // xadmin.father_reload();
                                });
                        } else {
                            layer.msg(res.msg);
                        }
                    }, function (res) {
                    });
                });
                return false;
            });
        //请求select的数据API
        var params = {};
        ksapp.postJSON('/admin/api/goldcorn/price/getPriceTypes', params, function (res) {
            if (res.code == 0) {
                //填充数据
                $("select[name=type]").empty();
                for (var i = 0; i < res.data.length; i++) {
                    var html = "<option value='" + res.data[i].key + "'>";
                    html += res.data[i].value + "</option>";
                    $("select[name=type]").append(html);
                }
                //重新渲染表单
                form.render();
            } else {
                layer.msg(res.msg);
            }
        }, function (res) {
        });
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_price_list.html
New file
@@ -0,0 +1,308 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>金币获取类型列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../css/theme3049.min.css">
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="../js/utils.js"></script>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">###</a>
                <a>
                    <cite>###</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                            <input type="date" name="startTime" lay-verify="" placeholder="" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <input type="date" name="endTime" lay-verify="" placeholder="" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <select type="text" name="type" lay-verify=""
                                    class="layui-input"></select>
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <button id="search" class="layui-btn" lay-submit="" lay-filter="search">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table" id="table_list" lay-filter="app">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn" onclick="xadmin.open('添加金币任务单价设置','gold_corn_get_price_add.html',500,580)"><i
                class="layui-icon"></i>添加
        </button>
        <button class="layui-btn layui-btn-danger" lay-event="delete">
            <i class="layui-icon">&#xe640;</i>
            删除
        </button>
    </div>
</script>
<script type="text/html" id="optContainer">
    <div class="layui-btn-container">
        <a title="修改" onclick="xadmin.open('修改金币任务单价设置','gold_corn_get_price_update.html?id={{d.id}}',500,580)"
           href="javascript:;">
            <i class="layui-icon">&#xe642;</i>
        </a>
        <a title="删除" onclick="member_del(this,{{d.LAY_INDEX }},'{{d.id}}')" href="javascript:;">
            <i class="layui-icon">&#xe640;</i>
        </a>
    </div>
</script>
<script type="text/html" id="statusContainer">
    <div class="layui-btn-container">
        {{# if(d.status==0){ }}
        <span class="layui-btn layui-btn-mini">
            正常
        </span>
        {{# }else{ }}
        <span class="layui-btn layui-btn-danger layui-btn-mini">
             已删除
        </span>
        {{# } }}
    </div>
</script>
<script type="text/html" id="switchTpl">
    <!-- 这里的checked的状态只是演示 -->
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script type="text/html" id="imgshow">
    <!-- 这里的checked的状态只是演示 -->
    <img src="{{d.}}"/>
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script>
    function member_del(obj, index, id) {
        layer.confirm('确认要删除吗?', function (index) {
            //发异步删除数据
            app.delete(obj, index, id);
        });
    }
</script>
<script>
    var tableIns = null;
    var app;
    $(function () {
        app = new Vue({
            el: "#app",
            data: {
                key: '',
                start: '',
                end: '',
                appList: []
            },
            watch: {},
            created: function () {
            },
            methods: {
                init: function () {
                    //初始化
                    layui.use(['laydate', 'form', 'table'], function () {
                        var laydate = layui.laydate,
                            form = layui.form,
                            table = layui.table;
                        //渲染日期输入框
                        laydate.render({
                            elem: "intput[name=startTime]" //指定元素
                        });
                        laydate.render({
                            elem: "intput[name=startTime]" //指定元素
                        });
                        //搜索条件
                        form.on('submit(search)', function (data) {
                            app.search(data.field);
                            return false;
                        });
                        var params = {};
                        ksapp.postJSON('/admin/api/goldcorn/price/getPriceTypes', params, function (res) {
                            if (res.code == 0) {
                                //填充数据
                                $("select[name=type]").empty();
                                $("select[name=type]").append("<option value=''>请选择</option>");
                                for (var i = 0; i < res.data.length; i++) {
                                    var html = "<option value='" + res.data[i].key + "'>";
                                    html += res.data[i].value + "</option>";
                                    $("select[name=type]").append(html);
                                }
                                //重新渲染表单
                                form.render();
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "/admin/api/goldcorn/price/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
                                {field: 'id', width: 120, sort: false, title: "ID"},
                                {field: 'type', width: 120, sort: false, title: "类型"},
                                {field: 'cornNum', width: 120, sort: false, title: "金币数量"},
                                {field: 'validateTime', width: 120, sort: false, title: "生效时间"},
                                {field: 'remarks', width: 120, sort: false, title: "备注"},
                                {field: 'createTime', width: 120, sort: false, title: "创建时间"},
                                {field: 'updateTime', width: 120, sort: false, title: "修改时间"},
                                {fixed: 'right', width: 80, title: "操作", toolbar: '#optContainer'}]],
                            page: true,
                            parseData: function (res) { //res 即为原始返回的数据
                                if (res.code != 0)
                                    return;
                                if (res.data.list == null)
                                    return;
                                console.log(res.data.list)
                                return {
                                    "code": res.code, //解析接口状态
                                    "msg": res.msg, //解析提示文本
                                    "count": res.data.count, //解析数据长度
                                    "data": res.data.list //解析数据列表
                                };
                            },
                            error: function (e, msg) {
                                ksapp.tableError(e)
                            }
                            //,…… //其他参数
                        });
                        //头工具栏事件
                        table.on('toolbar(app)',
                            function (obj) {
                                var checkStatus = table.checkStatus(obj.config.id);
                                switch (obj.event) {
                                    case 'delete':
                                        var data = checkStatus.data;
                                        if (data == null || data.length == 0) {
                                            layer.msg("未选择选项");
                                            return;
                                        }
                                        var ids = new Array();
                                        for (var i = 0; i < data.length; i++)
                                            ids.push(data[i].id);
                                        layer.confirm('确认要删除吗?', function (index) {
                                            //发异步删除数据
                                            app.deleteList(ids, function () {
                                                layer.msg("删除成功");
                                                $("form").submit();
                                            });
                                        });
                                        break;
                                }
                                ;
                            });
                        //请求搜索表单中需要的数据
                        $('#search').trigger("click");
                    });
                },
                delete: function (obj, index, id) {
                    var ids = new Array();
                    ids.push(id);
                    app.deleteList(ids, function () {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.post("/admin/api/goldcorn/price/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {
                            layer.msg(e.msg);
                        }
                    }, function (e) {
                    });
                },
                search: function (params) {
                    if (params["startTime"].length == 0) {
                        delete params["startTime"];
                    }
                    if (params["endTime"].length == 0) {
                        delete params["endTime"];
                    }
                    if (params["type"].length == 0) {
                        delete params["type"];
                    }
                    //数据重载
                    tableIns.reload({
                        where: params,
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                    });
                },
            }
        });
        app.init();
    });
</script>
<script>
</script>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_price_update.html
New file
@@ -0,0 +1,189 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>修改金币获取类型</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="update">
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                        类型</label>
                    <div class="layui-input-block">
                          <input type="text" name="type"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        金币数量</label>
                    <div class="layui-input-block">
                          <input type="text" name="cornNum"  lay-verify="required|number"  placeholder="请输入金币数量" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        生效日期</label>
                    <div class="layui-input-block">
                          <input type="datetime" name="validateTime" id="validateTime"  lay-verify="required|datetime"  placeholder="请选择生效时间" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="update" lay-submit="">确定修改</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    //填充数据
    function fillData(form) {
        var id = ksapp.getQueryParam("id");
        if (id) {
        } else {
            layer.msg("id为空");
            return;
        }
        ksapp.post('/admin/api/goldcorn/price/get', {id: id}, function (res) {
            if (res.code == 0) {
                form.val("update",res.data);
            } else {
                layer.msg(res.msg);
            }
        }, function (res) {
            layer.msg("详情获取失败");
        });
    }
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload', 'laydate'], function () {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate,
            upload = layui.upload;
        laydate.render({
            elem: '#validateTime'
            ,type: 'datetime'
        });
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //填充表单数据
        //请求数据
        //form.data();
        //监听提交
        form.on('submit(update)',
                function (data) {
                    console.log(data.field);
                    //转换json对象
                    for (key in data.field) {
                        if (key.indexOf(".") > -1) {
                            var value = data.field[key];
                            delete data.field[key];
                            var onkeys = key.split(".");
                            //创建对象
                            if (data.field[onkeys[0]] == undefined) {
                                data.field[onkeys[0]] = {};
                            }
                            data.field[onkeys[0]][onkeys[1]] = value;
                        }
                    }
                    uploadTool.upload(function () {
                        //发异步,把数据提交给php
                        var params = data.field;
                        params.id = ksapp.getQueryParam("id");
                        ksapp.post('/admin/api/goldcorn/price/update', data.field, function (res) {
                            if (res.code == 0) {
                                layer.alert("修改成功", {
                                            icon: 6
                                        },
                                        function () {
                                            //关闭当前frame
                                            xadmin.close();
                                            // 可以对父窗口进行刷新
                                            // xadmin.father_reload();
                                        });
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                    });
                    return false;
                });
        //请求select的数据API
         fillData(form)
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/goldcorn/gold_corn_get_record_list.html
New file
@@ -0,0 +1,283 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>金币获得记录列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../css/theme3049.min.css">
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="../js/utils.js"></script>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">###</a>
                <a>
                    <cite>###</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                            <input type="date" name="startTime" lay-verify="" placeholder="" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <input type="date" name="endTime" lay-verify="" placeholder="" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <select name="type">
                            </select></div>
                        <div class="layui-inline layui-show-xs-block">
                            <input type="text" name="uid" lay-verify="" placeholder="请输入用户ID" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <button id="search" class="layui-btn" lay-submit="" lay-filter="search">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table" id="table_list" lay-filter="app">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
    </div>
</script>
<script type="text/html" id="optContainer">
    <div class="layui-btn-container">
    </div>
</script>
<script type="text/html" id="statusContainer">
    <div class="layui-btn-container">
        {{# if(d.status==0){ }}
        <span class="layui-btn layui-btn-mini">
            正常
        </span>
        {{# }else{ }}
        <span class="layui-btn layui-btn-danger layui-btn-mini">
             已删除
        </span>
        {{# } }}
    </div>
</script>
<script type="text/html" id="switchTpl">
    <!-- 这里的checked的状态只是演示 -->
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script type="text/html" id="imgshow">
    <!-- 这里的checked的状态只是演示 -->
    <img src="{{d.}}"/>
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script>
</script>
<script>
    var tableIns = null;
    $(function () {
        var app = new Vue({
            el: "#app",
            data: {
                key: '',
                start: '',
                end: '',
                appList: []
            },
            watch: {},
            created: function () {
            },
            methods: {
                init: function () {
                    //初始化
                    layui.use(['laydate', 'form', 'table'], function () {
                        var laydate = layui.laydate,
                            form = layui.form,
                            table = layui.table;
                        //渲染日期输入框
                        laydate.render({
                            elem: "intput[name=startTime]" //指定元素
                        });
                        laydate.render({
                            elem: "intput[name=endTime]" //指定元素
                        });
                        //搜索条件
                        form.on('submit(search)', function (data) {
                            app.search(data.field);
                            return false;
                        });
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "/admin/api/goldcorn/get/record/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
                                {field: 'id', width: 120, sort: false, title: "ID"},
                                {field: 'type', width: 120, sort: false, title: "类型"},
                                {field: 'cornNum', width: 120, sort: false, title: "金币数量"},
                                {field: 'fromUid', width: 120, sort: false, title: "缘由用户ID"},
                                {field: 'remarks', width: 120, sort: false, title: "备注"},
                                {field: 'createTime', width: 120, sort: false, title: "创建时间"},
                                {fixed: 'right', width: 80, title: "操作", toolbar: '#optContainer'}]],
                            page: true,
                            parseData: function (res) { //res 即为原始返回的数据
                                if (res.code != 0)
                                    return;
                                if (res.data.list == null)
                                    return;
                                console.log(res.data.list)
                                return {
                                    "code": res.code, //解析接口状态
                                    "msg": res.msg, //解析提示文本
                                    "count": res.data.count, //解析数据长度
                                    "data": res.data.list //解析数据列表
                                };
                            },
                            error: function (e, msg) {
                                ksapp.tableError(e)
                            }
                            //,…… //其他参数
                        });
                        //头工具栏事件
                        table.on('toolbar(app)',
                            function (obj) {
                                var checkStatus = table.checkStatus(obj.config.id);
                                switch (obj.event) {
                                    case 'delete':
                                        var data = checkStatus.data;
                                        if (data == null || data.length == 0) {
                                            layer.msg("未选择选项");
                                            return;
                                        }
                                        var ids = new Array();
                                        for (var i = 0; i < data.length; i++)
                                            ids.push(data[i].id);
                                        layer.confirm('确认要删除吗?', function (index) {
                                            //发异步删除数据
                                            app.deleteList(ids, function () {
                                                layer.msg("删除成功");
                                                $("form").submit();
                                            });
                                        });
                                        break;
                                }
                                ;
                            });
                        //请求搜索表单中需要的数据
                        var requestCount = 0;
                        requestCount++;
                        var params = {};
                        ksapp.postJSON('/admin/api/goldcorn/price/getPriceTypes', params, function (res) {
                            if (res.code == 0) {
                                //填充数据
                                $("select[name=type]").empty();
                                $("select[name=type]").append("<option value=''>请选择</option>");
                                for (var i = 0; i < res.data.length; i++) {
                                    var html = "<option value='" + res.data[i].key + "'>";
                                    html += res.data[i].value + "</option>";
                                    $("select[name=type]").append(html);
                                }
                                //重新渲染表单
                                form.render();
                                requestCount--;
                                if (requestCount <= 0) {
                                    //搜索
                                    $('#search').trigger("click");
                                }
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                    });
                },
                delete: function (obj, index, id) {
                    var ids = new Array();
                    ids.push(id);
                    app.deleteList(ids, function () {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    });
                },
                search: function (params) {
                    if(params["startTime"].length==0){
                        delete params["startTime"];
                    }
                    if(params["endTime"].length==0){
                        delete params["endTime"];
                    }
                    if(params["type"].length==0){
                        delete params["type"];
                    }
                    if(params["uid"].length==0){
                        delete params["uid"];
                    }
                    //数据重载
                    tableIns.reload({
                        where: params,
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                    });
                },
            }
        });
        app.init();
    });
</script>
<script>
</script>
</html>
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_add.html
New file
@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>新增金币兑换人民币汇率设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="add">
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    <span class="x-red">*</span>
                    日期</label>
                <div class="layui-input-block">
                    <input type="date" name="day"  lay-verify="required|date" placeholder="" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    <span class="x-red">*</span>
                    汇率</label>
                <div class="layui-input-block">
                    <input type="text" name="rate" lay-verify="required|number" placeholder="1金币兑换的人民币数量"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_appCode" class="layui-form-label">
                    <span class="x-red">*</span>
                    生效时间</label>
                <div class="layui-input-block">
                    <input type="datetime" name="validateTime" id="validateTime" lay-verify="required|datetime" placeholder="生效时间"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="">确定</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload', 'laydate'], function () {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate,
            upload = layui.upload;
        laydate.render({
            elem: '#validateTime'
            ,type: 'datetime'
        });
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //监听提交
        form.on('submit(add)',
            function (data) {
                console.log(data.field);
                //转换json对象
                for (key in data.field) {
                    if (key.indexOf(".") > -1) {
                        var value = data.field[key];
                        delete data.field[key];
                        var onkeys = key.split(".");
                        //创建对象
                        if (data.field[onkeys[0]] == undefined) {
                            data.field[onkeys[0]] = {};
                        }
                        data.field[onkeys[0]][onkeys[1]] = value;
                    }
                }
                uploadTool.upload(function () {
                    //发异步,把数据提交给php
                    ksapp.post('/admin/api/goldcorn/exchangerate/add', data.field, function (res) {
                        if (res.code == 0) {
                            layer.alert("增加成功", {
                                    icon: 6
                                },
                                function () {
                                    //关闭当前frame
                                    xadmin.close();
                                    // 可以对父窗口进行刷新
                                    // xadmin.father_reload();
                                });
                        } else {
                            layer.msg(res.msg);
                        }
                    }, function (res) {
                    });
                });
                return false;
            });
        //请求select的数据API
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_list.html
New file
@@ -0,0 +1,261 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>金币兑换人民币汇率设置列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="./css/theme3049.min.css">
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="../js/utils.js"></script>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">###</a>
                <a>
                    <cite>###</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                          <input type="date" name="day"  lay-verify=""  placeholder="" autocomplete="off"
                               class="layui-input">
                        </div>
                        <div class="layui-inline layui-show-xs-block">
                            <button id="search" class="layui-btn" lay-submit="" lay-filter="search">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table" id="table_list" lay-filter="app">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn" onclick="xadmin.open('添加金币兑换人民币汇率设置','gold_corn_money_exchange_rate_record_add.html',500,580)"><i
                class="layui-icon"></i>添加
        </button>
        <button class="layui-btn layui-btn-danger" lay-event="delete">
            <i class="layui-icon">&#xe640;</i>
            删除
        </button>
    </div>
</script>
<script type="text/html" id="optContainer">
    <div class="layui-btn-container">
        <a title="修改" onclick="xadmin.open('修改金币兑换人民币汇率设置','gold_corn_money_exchange_rate_record_update.html?id={{d.id}}',500,580)" href="javascript:;">
            <i class="layui-icon">&#xe642;</i>
        </a>
        <a title="删除" onclick="member_del(this,{{d.LAY_INDEX }},'{{d.id}}')" href="javascript:;">
            <i class="layui-icon">&#xe640;</i>
        </a>
    </div>
</script>
<script type="text/html" id="statusContainer">
    <div class="layui-btn-container">
        {{# if(d.status==0){ }}
        <span class="layui-btn layui-btn-mini">
            正常
        </span>
        {{# }else{ }}
        <span class="layui-btn layui-btn-danger layui-btn-mini">
             已删除
        </span>
        {{# } }}
    </div>
</script>
<script type="text/html" id="switchTpl">
    <!-- 这里的checked的状态只是演示 -->
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script type="text/html" id="imgshow">
    <!-- 这里的checked的状态只是演示 -->
    <img  src="{{d.}}"/>
    <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id==
           10003 ? 'checked': ''}} >
</script>
<script>
    function member_del(obj, index, id) {
        layer.confirm('确认要删除吗?', function (index) {
            //发异步删除数据
            app.delete(obj, index, id);
        });
    }
</script>
<script>
    var tableIns = null;
    var app=null;
    $(function () {
         app = new Vue({
            el: "#app",
            data: {
                key: '',
                start: '',
                end: '',
                appList: []
            },
            watch: {},
            created: function () {
            },
            methods: {
                init: function () {
                    //初始化
                    layui.use(['laydate', 'form', 'table'], function () {
                        var laydate = layui.laydate,
                                form = layui.form,
                                table = layui.table;
                        //渲染日期输入框
                                laydate.render({
                                    elem: "intput[name=day]" //指定元素
                                });
                        //搜索条件
                        form.on('submit(search)', function (data) {
                            app.search(data.field);
                            return false;
                        });
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "/admin/api/goldcorn/exchangerate/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
                                    {field: 'id', width: 120, sort: false, title: "ID"},
                                    {field: 'day', width: 120, sort: false, title: "日期"},
                                    {field: 'rate', width: 120, sort: false, title: "汇率"},
                                    {field: 'validateTime', width: 120, sort: false, title: "生效时间"},
                                    {field: 'createTime', width: 120, sort: false, title: "创建时间"},
                                    {field: 'updateTime', width: 120, sort: false, title: "修改时间"},
                                {fixed: 'right', width: 80, title: "操作", toolbar: '#optContainer'}]],
                            page: true,
                            parseData: function (res) { //res 即为原始返回的数据
                                if (res.code != 0)
                                    return;
                                if (res.data.list == null)
                                    return;
                                console.log(res.data.list)
                                return {
                                    "code": res.code, //解析接口状态
                                    "msg": res.msg, //解析提示文本
                                    "count": res.data.count, //解析数据长度
                                    "data": res.data.list //解析数据列表
                                };
                            },
                            error: function (e, msg) {
                                ksapp.tableError(e)
                            }
                            //,…… //其他参数
                        });
                        //头工具栏事件
                        table.on('toolbar(app)',
                                function (obj) {
                                    var checkStatus = table.checkStatus(obj.config.id);
                                    switch (obj.event) {
                                        case 'delete':
                                            var data = checkStatus.data;
                                            if (data == null || data.length == 0) {
                                                layer.msg("未选择选项");
                                                return;
                                            }
                                            var ids = new Array();
                                            for (var i = 0; i < data.length; i++)
                                                ids.push(data[i].id);
                                            layer.confirm('确认要删除吗?', function (index) {
                                                //发异步删除数据
                                                app.deleteList(ids, function () {
                                                    layer.msg("删除成功");
                                                    $("form").submit();
                                                });
                                            });
                                            break;
                                    };
                                });
                        //请求搜索表单中需要的数据
                          $('#search').trigger("click");
                    });
                },
                delete: function (obj, index, id) {
                    var ids = new Array();
                    ids.push(id);
                    app.deleteList(ids, function () {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.postJSON("/admin/api/goldcorn/exchangerate/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {
                            layer.msg(e.msg);
                        }
                    }, function (e) {
                    });
                },
                search: function (params) {
                    if(params["day"].length==0){
                        delete params["day"];
                    }
                    //数据重载
                    tableIns.reload({
                        where: params,
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                    });
                },
            }
    });
    app.init();
    });
</script>
<script>
</script>
</html>
app/src/main/resources/static/goldcorn/gold_corn_money_exchange_rate_record_update.html
New file
@@ -0,0 +1,190 @@
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>修改金币兑换人民币汇率设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/http.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" lay-filter="update">
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        日期</label>
                    <div class="layui-input-block">
                          <input type="date" name="day"  lay-verify="required|date"  placeholder="" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        汇率</label>
                    <div class="layui-input-block">
                          <input type="text" name="rate"  lay-verify="required|number"  placeholder="1金币兑换的人民币数量" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_appCode" class="layui-form-label">
                           <span class="x-red">*</span>
                        生效时间</label>
                    <div class="layui-input-block">
                          <input type="datetime" id="validateTime" name="validateTime"  lay-verify="required|datetime"  placeholder="生效时间" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            <div class="layui-form-item">
                <label for="L_remarks" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="update" lay-submit="">确定修改</button>
            </div>
        </form>
    </div>
</div>
<script>
    //初始化上传控件
    var uploadTool = {
        callback: null,
        chooseImage: {},
        uploadArray: new Array(),
        init: function (upload) {
            this.uploadArray = new Array();
        },
        upload: function (result) {
            if (this.uploadArray.length > 0) {
                this.callback = result;
                //同时上传
                for (var i = 0; i < this.uploadArray.length; i++) {
                    this.uploadArray[i].upload();
                }
            } else {
                result();
            }
        }
    };
</script>
<script>
    //填充数据
    function fillData(form) {
        var id = ksapp.getQueryParam("id");
        if (id) {
        } else {
            layer.msg("id为空");
            return;
        }
        ksapp.post('/admin/api/goldcorn/exchangerate/get', {id: id}, function (res) {
            if (res.code == 0) {
                form.val("update",res.data);
            } else {
                layer.msg(res.msg);
            }
        }, function (res) {
            layer.msg("详情获取失败");
        });
    }
</script>
<script>
    layui.use(['form', 'layer', 'jquery', 'upload', 'laydate'], function () {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate,
            upload = layui.upload;
        laydate.render({
            elem: '#validateTime'
            ,type: 'datetime'
        });
        var verify = {};
        //自定义验证规则
        form.verify(verify);
        //渲染上传控件
        uploadTool.init(upload);
        //填充表单数据
        //请求数据
        //form.data();
        //监听提交
        form.on('submit(update)',
                function (data) {
                    console.log(data.field);
                    //转换json对象
                    for (key in data.field) {
                        if (key.indexOf(".") > -1) {
                            var value = data.field[key];
                            delete data.field[key];
                            var onkeys = key.split(".");
                            //创建对象
                            if (data.field[onkeys[0]] == undefined) {
                                data.field[onkeys[0]] = {};
                            }
                            data.field[onkeys[0]][onkeys[1]] = value;
                        }
                    }
                    uploadTool.upload(function () {
                        //发异步,把数据提交给php
                        var params = data.field;
                        params.id = ksapp.getQueryParam("id");
                        ksapp.post('/admin/api/goldcorn/exchangerate/update', data.field, function (res) {
                            if (res.code == 0) {
                                layer.alert("修改成功", {
                                            icon: 6
                                        },
                                        function () {
                                            //关闭当前frame
                                            xadmin.close();
                                            // 可以对父窗口进行刷新
                                            // xadmin.father_reload();
                                        });
                            } else {
                                layer.msg(res.msg);
                            }
                        }, function (res) {
                        });
                    });
                    return false;
                });
        //请求select的数据API
         fillData(form)
    })
    ;
</script>
</body>
</html>
app/src/main/resources/static/index.html
@@ -2,7 +2,7 @@
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>定位管理系统</title>
    <title>赚钱小视频系统</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
@@ -111,6 +111,61 @@
            <li>
                <a href="javascript:;">
                    <i class="layui-icon left-nav-li" lay-tips="用户反馈">&#xe6b2;</i>
                    <cite>金币管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a onclick="xadmin.add_tab('金币汇率','goldcorn/gold_corn_money_exchange_rate_record_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>金币汇率</cite></a>
                    </li>
                    <li>
                        <a onclick="xadmin.add_tab('金币获得方式设置','goldcorn/gold_corn_get_price_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>金币任务单价</cite></a>
                    </li>
                    <li>
                        <a onclick="xadmin.add_tab('金币获得记录','goldcorn/gold_corn_get_record_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>金币获得记录</cite></a>
                    </li>
                    <li>
                        <a onclick="xadmin.add_tab('金币消耗记录','goldcorn/gold_corn_consume_record_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>金币消耗记录</cite></a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon left-nav-li" lay-tips="用户反馈">&#xe6b2;</i>
                    <cite>资金管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a onclick="xadmin.add_tab('用户建议','feedback/advice_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>用户建议</cite></a>
                    </li>
                    <li>
                        <a onclick="xadmin.add_tab('隐私投诉','feedback/privacy_complain_list.html')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>隐私投诉</cite></a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon left-nav-li" lay-tips="用户反馈">&#xe6b2;</i>
                    <cite>用户反馈</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
app/src/main/resources/static/money/extract_list.html
@@ -162,7 +162,7 @@
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "admin/api/money/extract/list",
                            url: "/admin/api/money/extract/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
@@ -236,7 +236,7 @@
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.post("admin/api/money/extract/delete", {ids: JSON.stringify(ids)}, function (e) {
                    ksapp.post("/admin/api/money/extract/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {
app/src/main/resources/static/money/user_money_record_list.html
@@ -162,7 +162,7 @@
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "admin/api/money/record/list",
                            url: "/admin/api/money/record/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
@@ -233,7 +233,7 @@
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.post("admin/api/money/record/delete", {ids: JSON.stringify(ids)}, function (e) {
                    ksapp.post("/admin/api/money/record/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {
app/src/main/resources/static/team/team_invite_relation_list.html
@@ -162,7 +162,7 @@
                        tableIns = table.render({
                            elem: '#table_list',
                            url: "admin/api/team/list",
                            url: "/admin/api/team/list",
                            toolbar: "#toolbar",
                            totalRow: true,
                            cols: [[{type: 'checkbox', title: "ID"},
@@ -231,7 +231,7 @@
                    });
                },
                deleteList: function (ids, success) {
                    ksapp.post("admin/api/team/delete", {ids: JSON.stringify(ids)}, function (e) {
                    ksapp.post("/admin/api/team/delete", {ids: JSON.stringify(ids)}, function (e) {
                        if (e.code == 0) {
                            success();
                        } else {