New file |
| | |
| | | package com.yeshi.fanli.controller.admin.shop;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.io.PrintWriter;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoods;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsException;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetException;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetPayException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/blGoods")
|
| | | public class BanLiShopGoodsAdminController {
|
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsService banLiShopGoodsService;
|
| | |
|
| | | /**
|
| | | * 保存信息
|
| | | * |
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BanLiShopGoods record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | String picture = null;
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | | MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
|
| | | MultipartFile file = fileRequest.getFile("file");
|
| | | if (file != null)
|
| | | picture = uploadPicture(file);
|
| | | }
|
| | | record.setPicture(picture);
|
| | | banLiShopGoodsService.addGoods(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BanLiShopGoodsException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (BanLiShopGoodsSetException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (BanLiShopGoodsSetPayException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 上传图片
|
| | | * |
| | | * @param file
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public String uploadPicture(MultipartFile file) throws BanLiShopGoodsException {
|
| | | // 文件解析
|
| | | InputStream inputStream;
|
| | | try {
|
| | | inputStream = file.getInputStream();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | throw new BanLiShopGoodsException(1, "图片获取失败");
|
| | | }
|
| | | String contentType = file.getContentType();
|
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | | // 文件路径
|
| | | String filePath = "/img/HomeNavbar/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | return COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
|
| | | PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 1)
|
| | | pageIndex = 1;
|
| | |
|
| | | if (pageSize == null || pageSize < 1)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | List<BanLiShopGoods> list = banLiShopGoodsService.listGoods(key, state, pageIndex, pageSize);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = banLiShopGoodsService.countGoods(key, state);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls();
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | * |
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | banLiShopGoodsService.delete(list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除数据"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.controller.admin.shop;
|
| | |
|
| | | import java.io.InputStream;
|
| | | import java.io.PrintWriter;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsClass;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsClassException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsClassService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/blClass")
|
| | | public class BanLiShopGoodsClassAdminController {
|
| | | |
| | | @Resource
|
| | | private BanLiShopGoodsClassService banLiShopGoodsClassService;
|
| | | |
| | | |
| | | /**
|
| | | * 保存信息
|
| | | * |
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BanLiShopGoodsClass record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | String picture = null;
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | | MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
|
| | | MultipartFile file = fileRequest.getFile("file");
|
| | | if (file != null)
|
| | | picture = uploadPicture(file);
|
| | | }
|
| | | record.setPicture(picture);
|
| | | banLiShopGoodsClassService.save(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BanLiShopGoodsClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 上传图片
|
| | | * @param file
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | private String uploadPicture(MultipartFile file) throws Exception {
|
| | | // 文件解析 |
| | | InputStream inputStream = file.getInputStream();
|
| | | String contentType = file.getContentType();
|
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | | |
| | | // 文件路径
|
| | | String filePath="/img/shopGoodsClass/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | return COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | | }
|
| | | |
| | | /** |
| | | * 删除
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | banLiShopGoodsClassService.delete(list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除数据"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 1)
|
| | | pageIndex = 1;
|
| | | |
| | | if (pageSize == null || pageSize < 1) |
| | | pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | List<BanLiShopGoodsClass> list = banLiShopGoodsClassService.listGoodsClass(pageIndex, pageSize, key);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | long count = banLiShopGoodsClassService.countGoodsClass(key);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); |
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 筛选列表
|
| | | * |
| | | * @param callback
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getOptions")
|
| | | public void getOptions(String callback, PrintWriter out) {
|
| | | try {
|
| | | List<BanLiShopGoodsClass> list = banLiShopGoodsClassService.listAllGoodsClass();
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | List<Object> result_list = new ArrayList<Object>();
|
| | | if (list != null && list.size() > 0) {
|
| | | for (BanLiShopGoodsClass record : list) {
|
| | | Map<String, Object> map = new HashMap<String, Object>();
|
| | | map.put("key", record.getId());
|
| | | map.put("value", record.getName());
|
| | | result_list.add(map);
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("result_list", result_list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.controller.admin.shop;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/blSet")
|
| | | public class BanLiShopGoodsSetAdminController {
|
| | | |
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | | |
| | | |
| | | /** |
| | | * 删除
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | banLiShopGoodsSetService.delete(list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除数据"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 1)
|
| | | pageIndex = 1;
|
| | | |
| | | if (pageSize == null || pageSize < 1) |
| | | pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | List<BanLiShopGoodsSets> list = banLiShopGoodsSetService.listQuery(pageIndex, pageSize, key);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | long count = banLiShopGoodsSetService.countQuery(key);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); |
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | // /**
|
| | | // * 筛选列表
|
| | | // * |
| | | // * @param callback
|
| | | // * @param out
|
| | | // */
|
| | | // @RequestMapping(value = "getOptions")
|
| | | // public void getOptions(String callback, PrintWriter out) {
|
| | | // try {
|
| | | // List<BanLiShopGoodsClass> list = banLiShopGoodsClassService.listAllGoodsClass();
|
| | | // if (list == null || list.size() == 0) {
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | // return;
|
| | | // }
|
| | | //
|
| | | // List<Object> result_list = new ArrayList<Object>();
|
| | | // if (list != null && list.size() > 0) {
|
| | | // for (BanLiShopGoodsClass record : list) {
|
| | | // Map<String, Object> map = new HashMap<String, Object>();
|
| | | // map.put("key", record.getId());
|
| | | // map.put("value", record.getName());
|
| | | // result_list.add(map);
|
| | | // }
|
| | | // }
|
| | | //
|
| | | // JSONObject data = new JSONObject();
|
| | | // data.put("result_list", result_list);
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | // } catch (Exception e) {
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.controller.admin.shop;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/blSetPay")
|
| | | public class BanLiShopGoodsSetsPayAdminController {
|
| | | |
| | | @Resource
|
| | | private BanLiShopGoodsSetPayService banLiShopGoodsSetPayService;
|
| | | |
| | | |
| | | /** |
| | | * 删除
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | banLiShopGoodsSetPayService.delete(list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除数据"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer payType, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 1)
|
| | | pageIndex = 1;
|
| | | |
| | | if (pageSize == null || pageSize < 1) |
| | | pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | List<BanLiShopGoodsSetsPay> list = banLiShopGoodsSetPayService.listQuery(pageIndex, pageSize, key, payType);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | long count = banLiShopGoodsSetPayService.countQuery(key, payType);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); |
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | // /**
|
| | | // * 筛选列表
|
| | | // * |
| | | // * @param callback
|
| | | // * @param out
|
| | | // */
|
| | | // @RequestMapping(value = "getOptions")
|
| | | // public void getOptions(String callback, PrintWriter out) {
|
| | | // try {
|
| | | // List<BanLiShopGoodsClass> list = banLiShopGoodsClassService.listAllGoodsClass();
|
| | | // if (list == null || list.size() == 0) {
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | // return;
|
| | | // }
|
| | | //
|
| | | // List<Object> result_list = new ArrayList<Object>();
|
| | | // if (list != null && list.size() > 0) {
|
| | | // for (BanLiShopGoodsClass record : list) {
|
| | | // Map<String, Object> map = new HashMap<String, Object>();
|
| | | // map.put("key", record.getId());
|
| | | // map.put("value", record.getName());
|
| | | // result_list.add(map);
|
| | | // }
|
| | | // }
|
| | | //
|
| | | // JSONObject data = new JSONObject();
|
| | | // data.put("result_list", result_list);
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | // } catch (Exception e) {
|
| | | // JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // }
|
| | | }
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | public void getList(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
|
| | | if (page == null || page < 1) {
|
| | | out.print(JsonUtil.loadFalseResult("页码不正确"));
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | public void getShopInfoV2(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | |
| | | * 精选1, 足迹列表2
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | public void getHistoryV2(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | if (type == null) {
|
| | | out.print(JsonUtil.loadFalseResult("类型不正确"));
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | public void getListV3(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
|
| | | if (page == null || page < 1) {
|
| | | out.print(JsonUtil.loadFalseResult("页码不正确"));
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | public void getShopInfoV3(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
|
| | | if (id == null) {
|
| | | out.print(JsonUtil.loadFalseResult("缺失店铺id"));
|
| | |
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | | |
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | JSONArray array = new JSONArray();
|
| | | |
| | | List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId((page - 1) * 50, 50,id);
|
| | | for (BrandGoodsCahe brandGoods: listGoods) {
|
| | | JDGoods goodsJD = brandGoods.getGoodsJD();
|
| | |
| | | * 精选1, 足迹列表2
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | public void getHistoryV3(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | if (type == null) {
|
| | | out.print(JsonUtil.loadFalseResult("类型不正确"));
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * s 首页配置信息
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHomeConfigNew", method = RequestMethod.POST)
|
| | | public void getHomeConfigNew(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | if (uid != null && uid == 0L)
|
| | | uid = null;
|
| | |
|
| | | AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg();
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) {
|
| | | appHomeFloatImg = null;
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | if (appHomeFloatImg != null) {
|
| | | data.put("floatImg", appHomeFloatImg);
|
| | | }
|
| | |
|
| | | String notifyImg = configService.getAppHomeFloatNotifyImg();
|
| | | if (!StringUtil.isNullOrEmpty(notifyImg)) {
|
| | | data.put("floatNotifyImg", notifyImg);
|
| | | }
|
| | |
|
| | | // 无新人弹框 则查询默认
|
| | | FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 0);
|
| | |
|
| | | if (floatAD != null) {
|
| | | JSONObject detail = new JSONObject();
|
| | | detail.put("img", floatAD.getPicture());
|
| | | detail.put("jumpDetail", floatAD.getJumpDetail());
|
| | | detail.put("params", floatAD.getParams());
|
| | | detail.put("showTime", floatAD.getShowMode());
|
| | | detail.put("accountLogin", floatAD.isJumpNeedLogin());
|
| | | data.put("floatImgDetail", detail);
|
| | | }
|
| | |
|
| | | // 领券帮助链接,1.5.2后生效
|
| | | String couponHelp = configService.get("taobao_coupon_help");
|
| | | data.put("couponHelpUrl", couponHelp);
|
| | |
|
| | | // 底部网页链接
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | data.put("htmlLink", configService.get("index_html_link_android"));
|
| | | }
|
| | |
|
| | | // 判断新老用户
|
| | | UserActiveLog da = null;
|
| | | if (uid != null)
|
| | | da = userActiveLogService.getFirstActiveInfo(uid);
|
| | | // 新人
|
| | | if (da == null || (System.currentTimeMillis() - da.getCreateTime().getTime()) <= 1000 * 60 * 60 * 24 * 15L) {
|
| | | data.put("userTimeType", 0);
|
| | | } else {// 老人
|
| | | data.put("userTimeType", 1);
|
| | | }
|
| | | data.put("hotFuctionLink",
|
| | | configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 消息中心弹框
|
| | | *
|
| | |
| | | import com.google.gson.stream.JsonReader;
|
| | | import com.google.gson.stream.JsonWriter;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum;
|
| | |
| | | import com.yeshi.fanli.entity.redpack.RedPackWinInvite.RedPackWinInviteTypeEnum;
|
| | | import com.yeshi.fanli.exception.redpack.RedPackExchangeException;
|
| | | import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackConfigService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackDetailService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackExchangeService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackGiveRecordService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackWinInviteService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackWinNewUserService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackDetailVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinDetailVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinInviteVO;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | private RedPackWinInviteService redPackWinInviteService;
|
| | |
|
| | | @Resource
|
| | | private RedPackWinNewUserService redPackWinNewUserService;
|
| | | |
| | | @Resource |
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | | @Resource
|
| | | private JumpDetailV2Service jumpDetailV2Service;
|
| | | |
| | | @Resource
|
| | | private SwiperPictureService swiperPictureService;
|
| | | |
| | | |
| | |
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 新人红包详情
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getWinDetail", method = RequestMethod.POST)
|
| | | public void getWinDetail(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | RedPackWinDetailVO winDetail = redPackWinNewUserService.receiveReward(uid);
|
| | | if (winDetail == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "红包已被抢光"));
|
| | | return;
|
| | | }
|
| | | |
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", redPackConfigService.getValueByKey("goods_shop_link_h5"));
|
| | | winDetail.setParams(params.toString());
|
| | | winDetail.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
|
| | | winDetail.setTips(redPackConfigService.getValueByKey("new_user_win_tips"));
|
| | |
|
| | | // 2、顶部轮播图
|
| | | List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("index_top");
|
| | | List<SwiperPicture> topPicList = new ArrayList<>();
|
| | | if (oldtopPicList != null && oldtopPicList.size() > 0)
|
| | | topPicList.addAll(oldtopPicList);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("detail", JsonUtil.getApiCommonGson().toJson(winDetail));
|
| | | data.put("banner", JsonUtil.getApiCommonGson().toJson(topPicList));
|
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "红包已被抢光啦"));
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mongodb.redpack;
|
| | |
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackWinNewUser;
|
| | |
|
| | | @Repository
|
| | | public class RedPackWinNewUserDao extends MongodbBaseDao<RedPackWinNewUser> {
|
| | | |
| | | /**
|
| | | * 查询已领取数据
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public RedPackWinNewUser getByUid(Long uid){
|
| | | if (uid == null || uid <= 0) |
| | | return null;
|
| | | |
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("uid").is(uid));
|
| | | return mongoTemplate.findOne(query, RedPackWinNewUser.class);
|
| | | }
|
| | | |
| | | }
|
| | |
| | | package com.yeshi.fanli.dao.mybatis.shop; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsClass; |
| | | |
| | | public interface BanLiShopGoodsClassMapper extends BaseMapper<BanLiShopGoodsClass> { |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.shop;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsClass;
|
| | |
|
| | | public interface BanLiShopGoodsClassMapper extends BaseMapper<BanLiShopGoodsClass> {
|
| | |
|
| | | /**
|
| | | * 查询有效
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsClass> listAllGoodsClass();
|
| | | |
| | | |
| | | /**
|
| | | * 列表查询
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsClass> listGoodsClass(@Param("start") long start, @Param("count") int count, @Param("key") String key);
|
| | |
|
| | | /**
|
| | | * 计数
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countGoodsClass(@Param("key") String key);
|
| | | |
| | | } |
| | |
| | | package com.yeshi.fanli.dao.mybatis.shop; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoods; |
| | | |
| | | public interface BanLiShopGoodsMapper extends BaseMapper<BanLiShopGoods> { |
| | | |
| | | BanLiShopGoods selectDetailByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * 商品列表查询 |
| | | * |
| | | * @param key |
| | | * @param state |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<BanLiShopGoods> listGoods(@Param("key") String key, @Param("state") Integer state, @Param("start") long start, |
| | | @Param("count") int count); |
| | | |
| | | /** |
| | | * 商品计数 |
| | | * |
| | | * @param key |
| | | * @param state |
| | | * @return |
| | | */ |
| | | long countGoods(@Param("key") String key, @Param("state") Integer state); |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.shop;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoods;
|
| | |
|
| | | public interface BanLiShopGoodsMapper extends BaseMapper<BanLiShopGoods> {
|
| | |
|
| | | BanLiShopGoods selectDetailByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 商品列表查询
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoods> listGoods(@Param("key") String key, @Param("state") Integer state, @Param("start") long start,
|
| | | @Param("count") int count);
|
| | |
|
| | | /**
|
| | | * 商品计数
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countGoods(@Param("key") String key, @Param("state") Integer state);
|
| | | |
| | | } |
| | |
| | | package com.yeshi.fanli.dao.mybatis.shop; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets; |
| | | |
| | | public interface BanLiShopGoodsSetsMapper extends BaseMapper<BanLiShopGoodsSets> { |
| | | |
| | | BanLiShopGoodsSets selectDetailByPrimaryKey(Long id); |
| | | |
| | | List<BanLiShopGoodsSets> listDetailByGoodsId(Long goodsId); |
| | | |
| | | long countByGoodsId(Long goodsId); |
| | | |
| | | List<BanLiShopGoodsSets> listByGoodsId(Long goodsId); |
| | | package com.yeshi.fanli.dao.mybatis.shop;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
|
| | |
|
| | | public interface BanLiShopGoodsSetsMapper extends BaseMapper<BanLiShopGoodsSets> {
|
| | |
|
| | | BanLiShopGoodsSets selectDetailByPrimaryKey(Long id);
|
| | |
|
| | | List<BanLiShopGoodsSets> listDetailByGoodsId(Long goodsId);
|
| | |
|
| | | long countByGoodsId(Long goodsId);
|
| | | |
| | | List<BanLiShopGoodsSets> listByGoodsId(Long goodsId);
|
| | | |
| | | |
| | | /**
|
| | | * 列表查询
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsSets> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key);
|
| | |
|
| | | /**
|
| | | * 计数
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countQuery(@Param("key") String key);
|
| | | } |
| | |
| | | package com.yeshi.fanli.dao.mybatis.shop; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay; |
| | | |
| | | public interface BanLiShopGoodsSetsPayMapper extends BaseMapper<BanLiShopGoodsSetsPay> { |
| | | |
| | | /** |
| | | * 根据套餐ID查询列表 |
| | | * @param goodsSetId |
| | | * @return |
| | | */ |
| | | List<BanLiShopGoodsSetsPay> listByGoodsSetId(Long goodsSetId); |
| | | |
| | | /** |
| | | * 根据套餐ID计数 |
| | | * @param goodsSetId |
| | | * @return |
| | | */ |
| | | long countByGoodsSetId(Long goodsSetId); |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.shop;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
|
| | |
|
| | | public interface BanLiShopGoodsSetsPayMapper extends BaseMapper<BanLiShopGoodsSetsPay> {
|
| | |
|
| | | /**
|
| | | * 根据套餐ID查询列表
|
| | | * @param goodsSetId
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsSetsPay> listByGoodsSetId(Long goodsSetId);
|
| | | |
| | | /**
|
| | | * 根据套餐ID计数
|
| | | * @param goodsSetId
|
| | | * @return
|
| | | */
|
| | | long countByGoodsSetId(Long goodsSetId);
|
| | | |
| | | |
| | | /**
|
| | | * 列表查询
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsSetsPay> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key, @Param("payType") Integer payType);
|
| | |
|
| | | /**
|
| | | * 计数
|
| | | * |
| | | * @param key
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countQuery(@Param("key") String key, @Param("payType") Integer payType);
|
| | |
|
| | | } |
| | |
| | | package com.yeshi.fanli.dao.mybatis.user; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra; |
| | | |
| | | public interface UserMoneyExtraMapper extends BaseMapper<UserMoneyExtra> { |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.user;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | |
|
| | | public interface UserMoneyExtraMapper extends BaseMapper<UserMoneyExtra> {
|
| | |
|
| | | /**
|
| | | * 查询金币大于0 的记录
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<UserMoneyExtra> listValid(@Param("start") long start, @Param("count")int count);
|
| | | } |
| | |
| | | @Column(name = "bf_name")
|
| | | private String name; // 品牌名称
|
| | |
|
| | | @Column(name = "bf_shop_key")
|
| | | private String shopKey; // 店铺匹配词
|
| | | |
| | | @Column(name = "bf_search_key")
|
| | | private String searchKey; // 搜索词
|
| | |
|
| | |
| | | public void setSearchKey(String searchKey) {
|
| | | this.searchKey = searchKey;
|
| | | }
|
| | |
|
| | | public String getShopKey() {
|
| | | return shopKey;
|
| | | }
|
| | |
|
| | | public void setShopKey(String shopKey) {
|
| | | this.shopKey = shopKey;
|
| | | }
|
| | | } |
| | |
| | | freeCouponGive("赠送免单券"),
|
| | | couponReward("奖励券"),
|
| | | taoLiJin("推广红包"),
|
| | | taoLiJinExchange("推广红包兑换金币"),
|
| | | give("赠送"),
|
| | | exchange("金币兑换"),
|
| | | couponActivate("免单券激活"),
|
New file |
| | |
| | | package com.yeshi.fanli.entity.redpack;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.springframework.data.mongodb.core.mapping.Document;
|
| | | import org.springframework.data.mongodb.core.mapping.Field;
|
| | |
|
| | | /**
|
| | | * 红包获得记录-新人相关
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Document(collection = "yeshi_ec_red_pack_win_new_user")
|
| | | public class RedPackWinNewUser {
|
| | | // 用户id
|
| | | @Field("id")
|
| | | private String uid;
|
| | | // 领取金额
|
| | | @Field("money")
|
| | | private BigDecimal money;
|
| | | // 领取次数
|
| | | @Field("num")
|
| | | private Integer num;
|
| | | |
| | | @Field("createTime")
|
| | | private Date createTime;
|
| | | |
| | | @Field("updateTime")
|
| | | private Date updateTime;
|
| | |
|
| | |
|
| | | public String getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(String uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public BigDecimal getMoney() {
|
| | | return money;
|
| | | }
|
| | |
|
| | | public void setMoney(BigDecimal money) {
|
| | | this.money = money;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Integer getNum() {
|
| | | return num;
|
| | | }
|
| | |
|
| | | public void setNum(Integer num) {
|
| | | this.num = num;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.exception.shop;
|
| | |
|
| | | import com.yeshi.fanli.exception.BaseException;
|
| | |
|
| | | public class BanLiShopGoodsClassException extends BaseException {
|
| | |
|
| | | private static final long serialVersionUID = 572112205824229000L;
|
| | |
|
| | | public BanLiShopGoodsClassException(int code, String msg) {
|
| | | super(code, msg);
|
| | | }
|
| | |
|
| | | public BanLiShopGoodsClassException() {
|
| | | super();
|
| | | }
|
| | | |
| | | }
|
| | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.brand.BrandInfo">
|
| | | <id column="bf_id" property="id" jdbcType="BIGINT"/>
|
| | | <result column="bf_name" property="name" jdbcType="VARCHAR"/>
|
| | | <result column="bf_shop_key" property="shopKey" jdbcType="VARCHAR"/>
|
| | | <result column="bf_search_key" property="searchKey" jdbcType="VARCHAR"/>
|
| | | <result column="bf_icon" property="icon" jdbcType="VARCHAR"/>
|
| | | <result column="bf_goods_total" property="goodsTotal" jdbcType="INTEGER"/>
|
| | |
| | | <resultMap id="ResultVOMap" type="com.yeshi.fanli.vo.brand.BrandInfoVO">
|
| | | <id column="bf_id" property="id" jdbcType="BIGINT"/>
|
| | | <result column="bf_name" property="name" jdbcType="VARCHAR"/>
|
| | | <result column="bf_shop_key" property="shopKey" jdbcType="VARCHAR"/>
|
| | | <result column="bf_search_key" property="searchKey" jdbcType="VARCHAR"/>
|
| | | <result column="bf_icon" property="icon" jdbcType="VARCHAR"/>
|
| | | <result column="bf_weight" property="weight" jdbcType="DOUBLE"/>
|
| | |
| | | </association>
|
| | | </resultMap>
|
| | |
|
| | | <sql id="Base_Column_List">bf_id,bf_cid,bf_name,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time</sql>
|
| | | <sql id="Base_Column_List">bf_id,bf_cid,bf_name,bf_shop_key,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_brand_info where bf_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_brand_info where bf_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info (bf_id,bf_cid,bf_name,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time) values (#{id,jdbcType=BIGINT},#{brandClass.id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{searchKey,jdbcType=VARCHAR},#{icon,jdbcType=VARCHAR},#{goodsTotal,jdbcType=INTEGER},#{weight,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info (bf_id,bf_cid,bf_name,bf_shop_key,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time) values (#{id,jdbcType=BIGINT},#{brandClass.id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{shopKey,jdbcType=VARCHAR},#{searchKey,jdbcType=VARCHAR},#{icon,jdbcType=VARCHAR},#{goodsTotal,jdbcType=INTEGER},#{weight,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">bf_id,</if>
|
| | | <if test="brandClass != null">bf_cid,</if>
|
| | | <if test="name != null">bf_name,</if>
|
| | | <if test="shopKey != null">bf_shop_key,</if>
|
| | | <if test="searchKey != null">bf_search_key,</if>
|
| | | <if test="icon != null">bf_icon,</if>
|
| | | <if test="goodsTotal != null">bf_goods_total,</if>
|
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="brandClass != null">#{brandClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="shopKey != null">#{shopKey,jdbcType=VARCHAR},</if>
|
| | | <if test="searchKey != null">#{searchKey,jdbcType=VARCHAR},</if>
|
| | | <if test="icon != null">#{icon,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsTotal != null">#{goodsTotal,jdbcType=INTEGER},</if>
|
| | |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.brand.BrandInfo">update yeshi_ec_brand_info set bf_cid = #{brandClass.id,jdbcType=BIGINT},bf_name = #{name,jdbcType=VARCHAR},bf_search_key = #{searchKey,jdbcType=VARCHAR},bf_icon = #{icon,jdbcType=VARCHAR},bf_goods_total = #{goodsTotal,jdbcType=INTEGER},bf_weight = #{weight,jdbcType=VARCHAR},bf_state = #{state,jdbcType=INTEGER},bf_create_time = #{createTime,jdbcType=TIMESTAMP},bf_update_time = #{updateTime,jdbcType=TIMESTAMP} where bf_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.brand.BrandInfo">update yeshi_ec_brand_info set bf_cid = #{brandClass.id,jdbcType=BIGINT},bf_name = #{name,jdbcType=VARCHAR},bf_shop_key = #{shopKey,jdbcType=VARCHAR},bf_search_key = #{searchKey,jdbcType=VARCHAR},bf_icon = #{icon,jdbcType=VARCHAR},bf_goods_total = #{goodsTotal,jdbcType=INTEGER},bf_weight = #{weight,jdbcType=VARCHAR},bf_state = #{state,jdbcType=INTEGER},bf_create_time = #{createTime,jdbcType=TIMESTAMP},bf_update_time = #{updateTime,jdbcType=TIMESTAMP} where bf_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.brand.BrandInfo">update yeshi_ec_brand_info
|
| | | <set>
|
| | | <if test="brandClass != null">bf_cid=#{brandClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">bf_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="shopKey != null">bf_shop_key=#{shopKey,jdbcType=VARCHAR},</if>
|
| | | <if test="searchKey != null">bf_search_key=#{searchKey,jdbcType=VARCHAR},</if>
|
| | | <if test="icon != null">bf_icon=#{icon,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsTotal != null">bf_goods_total=#{goodsTotal,jdbcType=INTEGER},</if>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsClassMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"> |
| | | <id column="sgc_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sgc_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="sgc_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="sgc_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sgc_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sgc_id,sgc_name,sgc_picture,sgc_create_time,sgc_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_class where sgc_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_shop_goods_class where sgc_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_shop_goods_class |
| | | (sgc_id,sgc_name,sgc_picture,sgc_create_time,sgc_update_time) values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_shop_goods_class |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sgc_id,</if> |
| | | <if test="name != null">sgc_name,</if> |
| | | <if test="picture != null">sgc_picture,</if> |
| | | <if test="createTime != null">sgc_create_time,</if> |
| | | <if test="updateTime != null">sgc_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass">update |
| | | yeshi_ec_shop_goods_class set sgc_name = |
| | | #{name,jdbcType=VARCHAR},sgc_picture = |
| | | #{picture,jdbcType=VARCHAR},sgc_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sgc_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where sgc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"> |
| | | update yeshi_ec_shop_goods_class |
| | | <set> |
| | | <if test="name != null">sgc_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">sgc_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">sgc_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sgc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where sgc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsClassMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass">
|
| | | <id column="sgc_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sgc_name" property="name" jdbcType="VARCHAR" />
|
| | | <result column="sgc_picture" property="picture" jdbcType="VARCHAR" />
|
| | | <result column="sgc_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sgc_update_time" property="updateTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sgc_id,sgc_name,sgc_picture,sgc_create_time,sgc_update_time
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_class where sgc_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_shop_goods_class where sgc_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_shop_goods_class
|
| | | (sgc_id,sgc_name,sgc_picture,sgc_create_time,sgc_update_time) values
|
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_shop_goods_class
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sgc_id,</if>
|
| | | <if test="name != null">sgc_name,</if>
|
| | | <if test="picture != null">sgc_picture,</if>
|
| | | <if test="createTime != null">sgc_create_time,</if>
|
| | | <if test="updateTime != null">sgc_update_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass">update
|
| | | yeshi_ec_shop_goods_class set sgc_name =
|
| | | #{name,jdbcType=VARCHAR},sgc_picture =
|
| | | #{picture,jdbcType=VARCHAR},sgc_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},sgc_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} where sgc_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass">
|
| | | update yeshi_ec_shop_goods_class
|
| | | <set>
|
| | | <if test="name != null">sgc_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">sgc_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">sgc_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">sgc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where sgc_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | |
| | | <select id="listAllGoodsClass" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_shop_goods_class |
| | | </select>
|
| | | |
| | | |
| | | <select id="listGoodsClass" resultMap="BaseResultMap">
|
| | | select <include refid="Base_Column_List" /> from yeshi_ec_shop_goods_class |
| | | where sgc_name like '${key}%'
|
| | | order by sgc_create_time desc |
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="countGoodsClass" resultType="java.lang.Long">
|
| | | select count(sgc_id) from yeshi_ec_shop_goods_class |
| | | where sgc_name like '${key}%'
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | <id column="sg_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sg_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="sg_sales_count" property="salesCount" jdbcType="BIGINT" /> |
| | | <result column="sg_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="sg_desc" property="desc" jdbcType="VARCHAR" /> |
| | | <result column="sg_charge_type" property="chargeType" jdbcType="VARCHAR" /> |
| | | <result column="sg_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="sg_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sg_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sg_weight" property="weight" jdbcType="INTEGER" /> |
| | | <association property="goodsClass" column="sg_class_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"> |
| | | <id column="sg_class_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <resultMap id="BaseResultDetailMap" type="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | <id column="sg_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sg_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="sg_sales_count" property="salesCount" jdbcType="BIGINT" /> |
| | | <result column="sg_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="sg_desc" property="desc" jdbcType="VARCHAR" /> |
| | | <result column="sg_charge_type" property="chargeType" jdbcType="VARCHAR" /> |
| | | <result column="sg_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="sg_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sg_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sg_weight" property="weight" jdbcType="INTEGER" /> |
| | | <association property="goodsClass" column="sg_class_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass" |
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsClassMapper.selectByPrimaryKey" /> |
| | | <collection property="setsList" column="sg_id" |
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsMapper.listDetailByGoodsId" /> |
| | | <collection property="imgList" column="sg_id" |
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsImgMapper.listByGoodsId" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sg_id,sg_title,sg_class_id,sg_sales_count,sg_picture,sg_desc,sg_charge_type,sg_state,sg_create_time,sg_update_time,sg_weight |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods where sg_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectDetailByPrimaryKey" resultMap="BaseResultDetailMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods where sg_id = #{0} |
| | | </select> |
| | | |
| | | <select id="listGoods" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods where sg_title like '${key}%' |
| | | <if test="state!=null"> |
| | | and sg_state=#{state} |
| | | </if> |
| | | order by sg_weight desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countGoods" resultType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from yeshi_ec_shop_goods where sg_title like '${key}%' |
| | | <if test="state!=null"> |
| | | and sg_state=#{state} |
| | | </if> |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_shop_goods where sg_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_goods |
| | | (sg_id,sg_title,sg_class_id,sg_sales_count,sg_picture,sg_desc,sg_charge_type,sg_state,sg_create_time,sg_update_time,sg_weight) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsClass.id,jdbcType=BIGINT},#{salesCount,jdbcType=BIGINT},#{picture,jdbcType=VARCHAR},#{desc,jdbcType=VARCHAR},#{chargeType,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_shop_goods |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sg_id,</if> |
| | | <if test="title != null">sg_title,</if> |
| | | <if test="goodsClass != null">sg_class_id,</if> |
| | | <if test="salesCount != null">sg_sales_count,</if> |
| | | <if test="picture != null">sg_picture,</if> |
| | | <if test="desc != null">sg_desc,</if> |
| | | <if test="chargeType != null">sg_charge_type,</if> |
| | | <if test="state != null">sg_state,</if> |
| | | <if test="createTime != null">sg_create_time,</if> |
| | | <if test="updateTime != null">sg_update_time,</if> |
| | | <if test="weight != null">sg_weight,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="goodsClass != null">#{goodsClass.id,jdbcType=BIGINT},</if> |
| | | <if test="salesCount != null">#{salesCount,jdbcType=BIGINT},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="chargeType != null">#{chargeType,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight != null">#{weight,jdbcType=INTEGER}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods">update |
| | | yeshi_ec_shop_goods set sg_title = |
| | | #{title,jdbcType=VARCHAR},sg_class_id = |
| | | #{goodsClass.id,jdbcType=BIGINT},sg_sales_count = |
| | | #{salesCount,jdbcType=BIGINT},sg_picture = |
| | | #{picture,jdbcType=VARCHAR},sg_desc = |
| | | #{desc,jdbcType=VARCHAR},sg_charge_type = |
| | | #{chargeType,jdbcType=VARCHAR},sg_state = |
| | | #{state,jdbcType=INTEGER},sg_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sg_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,sg_weight |
| | | =#{weight,jdbcType=INTEGER} where sg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | update yeshi_ec_shop_goods |
| | | <set> |
| | | <if test="title != null">sg_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="goodsClass != null">sg_class_id=#{goodsClass.id,jdbcType=BIGINT},</if> |
| | | <if test="salesCount != null">sg_sales_count=#{salesCount,jdbcType=BIGINT},</if> |
| | | <if test="picture != null">sg_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">sg_desc=#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="chargeType != null">sg_charge_type=#{chargeType,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">sg_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">sg_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sg_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight !=null">sg_weight =#{weight,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where sg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsMapper">
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | <id column="sg_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sg_title" property="title" jdbcType="VARCHAR" />
|
| | | <result column="sg_sales_count" property="salesCount" jdbcType="BIGINT" />
|
| | | <result column="sg_picture" property="picture" jdbcType="VARCHAR" />
|
| | | <result column="sg_desc" property="desc" jdbcType="VARCHAR" />
|
| | | <result column="sg_charge_type" property="chargeType" jdbcType="VARCHAR" />
|
| | | <result column="sg_state" property="state" jdbcType="INTEGER" />
|
| | | <result column="sg_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sg_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sg_weight" property="weight" jdbcType="INTEGER" />
|
| | | <association property="goodsClass" column="sg_class_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass">
|
| | | <id column="sg_class_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | |
|
| | | </resultMap>
|
| | | <resultMap id="BaseResultDetailMap" type="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | <id column="sg_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sg_title" property="title" jdbcType="VARCHAR" />
|
| | | <result column="sg_sales_count" property="salesCount" jdbcType="BIGINT" />
|
| | | <result column="sg_picture" property="picture" jdbcType="VARCHAR" />
|
| | | <result column="sg_desc" property="desc" jdbcType="VARCHAR" />
|
| | | <result column="sg_charge_type" property="chargeType" jdbcType="VARCHAR" />
|
| | | <result column="sg_state" property="state" jdbcType="INTEGER" />
|
| | | <result column="sg_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sg_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sg_weight" property="weight" jdbcType="INTEGER" />
|
| | | <association property="goodsClass" column="sg_class_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsClass"
|
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsClassMapper.selectByPrimaryKey" />
|
| | | <collection property="setsList" column="sg_id"
|
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsMapper.listDetailByGoodsId" />
|
| | | <collection property="imgList" column="sg_id"
|
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsImgMapper.listByGoodsId" />
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sg_id,sg_title,sg_class_id,sg_sales_count,sg_picture,sg_desc,sg_charge_type,sg_state,sg_create_time,sg_update_time,sg_weight
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods where sg_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <select id="selectDetailByPrimaryKey" resultMap="BaseResultDetailMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods where sg_id = #{0}
|
| | | </select>
|
| | |
|
| | | <select id="listGoods" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods where sg_title like '${key}%'
|
| | | <if test="state!=null">
|
| | | and sg_state=#{state}
|
| | | </if>
|
| | | order by sg_weight desc limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="countGoods" resultType="java.lang.Long">
|
| | | select
|
| | | count(*)
|
| | | from yeshi_ec_shop_goods where sg_title like '${key}%'
|
| | | <if test="state!=null">
|
| | | and sg_state=#{state}
|
| | | </if>
|
| | | </select>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_shop_goods where sg_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_goods
|
| | | (sg_id,sg_title,sg_class_id,sg_sales_count,sg_picture,sg_desc,sg_charge_type,sg_state,sg_create_time,sg_update_time,sg_weight)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsClass.id,jdbcType=BIGINT},#{salesCount,jdbcType=BIGINT},#{picture,jdbcType=VARCHAR},#{desc,jdbcType=VARCHAR},#{chargeType,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_shop_goods
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sg_id,</if>
|
| | | <if test="title != null">sg_title,</if>
|
| | | <if test="goodsClass != null">sg_class_id,</if>
|
| | | <if test="salesCount != null">sg_sales_count,</if>
|
| | | <if test="picture != null">sg_picture,</if>
|
| | | <if test="desc != null">sg_desc,</if>
|
| | | <if test="chargeType != null">sg_charge_type,</if>
|
| | | <if test="state != null">sg_state,</if>
|
| | | <if test="createTime != null">sg_create_time,</if>
|
| | | <if test="updateTime != null">sg_update_time,</if>
|
| | | <if test="weight != null">sg_weight,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsClass != null">#{goodsClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="salesCount != null">#{salesCount,jdbcType=BIGINT},</if>
|
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="desc != null">#{desc,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeType != null">#{chargeType,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight != null">#{weight,jdbcType=INTEGER}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods">update
|
| | | yeshi_ec_shop_goods set sg_title =
|
| | | #{title,jdbcType=VARCHAR},sg_class_id =
|
| | | #{goodsClass.id,jdbcType=BIGINT},sg_sales_count =
|
| | | #{salesCount,jdbcType=BIGINT},sg_picture =
|
| | | #{picture,jdbcType=VARCHAR},sg_desc =
|
| | | #{desc,jdbcType=VARCHAR},sg_charge_type =
|
| | | #{chargeType,jdbcType=VARCHAR},sg_state =
|
| | | #{state,jdbcType=INTEGER},sg_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},sg_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} ,sg_weight
|
| | | =#{weight,jdbcType=INTEGER} where sg_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | update yeshi_ec_shop_goods
|
| | | <set>
|
| | | <if test="title != null">sg_title=#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsClass != null">sg_class_id=#{goodsClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="salesCount != null">sg_sales_count=#{salesCount,jdbcType=BIGINT},</if>
|
| | | <if test="picture != null">sg_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="desc != null">sg_desc=#{desc,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeType != null">sg_charge_type=#{chargeType,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">sg_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">sg_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">sg_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight !=null">sg_weight =#{weight,jdbcType=INTEGER},</if>
|
| | | </set>
|
| | | where sg_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"> |
| | | <id column="sgs_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sgs_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="sgs_original_price" property="originalPrice" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="sgs_zk_price" property="zkPrice" jdbcType="DECIMAL" /> |
| | | <result column="sgs_sales_count" property="salesCount" |
| | | jdbcType="BIGINT" /> |
| | | <result column="sgs_stock" property="stock" jdbcType="INTEGER" /> |
| | | <result column="sgs_charge_fulu_num" property="chargeFuLuNum" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sgs_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sgs_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sgs_weight" property="weight" jdbcType="INTEGER" /> |
| | | <result column="sgs_sub_name" property="subName" jdbcType="VARCHAR" /> |
| | | <result column="sgs_state" property="state" jdbcType="INTEGER" /> |
| | | <association property="goods" column="sgs_goods_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | <id column="sgs_goods_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <resultMap id="BaseResultDetailMap" |
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"> |
| | | <id column="sgs_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sgs_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="sgs_original_price" property="originalPrice" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="sgs_zk_price" property="zkPrice" jdbcType="DECIMAL" /> |
| | | <result column="sgs_sales_count" property="salesCount" |
| | | jdbcType="BIGINT" /> |
| | | <result column="sgs_stock" property="stock" jdbcType="INTEGER" /> |
| | | <result column="sgs_charge_fulu_num" property="chargeFuLuNum" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sgs_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sgs_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sgs_weight" property="weight" jdbcType="INTEGER" /> |
| | | <result column="sgs_sub_name" property="subName" jdbcType="VARCHAR" /> |
| | | <result column="sgs_state" property="state" jdbcType="INTEGER" /> |
| | | <association property="goods" column="sgs_goods_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | <id column="sgs_goods_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | <collection property="payList" column="sgs_id" |
| | | ofType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay" |
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsPayMapper.listByGoodsSetId" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sgs_id,sgs_name,sgs_goods_id,sgs_original_price,sgs_zk_price,sgs_sales_count,sgs_stock,sgs_charge_fulu_num,sgs_create_time,sgs_update_time,sgs_weight,sgs_sub_name,sgs_state |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set where sgs_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectDetailByPrimaryKey" resultMap="BaseResultDetailMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set where sgs_id = #{0} |
| | | </select> |
| | | <select id="listDetailByGoodsId" resultMap="BaseResultDetailMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set where sgs_goods_id = #{0} |
| | | </select> |
| | | <select id="countByGoodsId" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long">select count(*) from yeshi_ec_shop_goods_set where |
| | | sgs_goods_id = #{0} |
| | | </select> |
| | | <select id="listByGoodsId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set where sgs_goods_id = #{0} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_shop_goods_set where sgs_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_shop_goods_set |
| | | (sgs_id,sgs_name,sgs_goods_id,sgs_original_price,sgs_zk_price,sgs_sales_count,sgs_stock,sgs_charge_fulu_num,sgs_create_time,sgs_update_time,sgs_weight,sgs_sub_name,sgs_state) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{originalPrice,jdbcType=DECIMAL},#{zkPrice,jdbcType=DECIMAL},#{salesCount,jdbcType=BIGINT},#{stock,jdbcType=INTEGER},#{chargeFuLuNum,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER},#{subName,jdbcType=VARCHAR},#{state,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_shop_goods_set |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sgs_id,</if> |
| | | <if test="name != null">sgs_name,</if> |
| | | <if test="goods != null">sgs_goods_id,</if> |
| | | <if test="originalPrice != null">sgs_original_price,</if> |
| | | <if test="zkPrice != null">sgs_zk_price,</if> |
| | | <if test="salesCount != null">sgs_sales_count,</if> |
| | | <if test="stock != null">sgs_stock,</if> |
| | | <if test="chargeFuLuNum != null">sgs_charge_fulu_num,</if> |
| | | <if test="createTime != null">sgs_create_time,</if> |
| | | <if test="updateTime != null">sgs_update_time,</if> |
| | | <if test="weight != null">sgs_weight,</if> |
| | | <if test="subName != null">sgs_sub_name,</if> |
| | | <if test="state != null">sgs_state,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="goods != null">#{goods.id,jdbcType=BIGINT},</if> |
| | | <if test="originalPrice != null">#{originalPrice,jdbcType=DECIMAL},</if> |
| | | <if test="zkPrice != null">#{zkPrice,jdbcType=DECIMAL},</if> |
| | | <if test="salesCount != null">#{salesCount,jdbcType=BIGINT},</if> |
| | | <if test="stock != null">#{stock,jdbcType=INTEGER},</if> |
| | | <if test="chargeFuLuNum != null">#{chargeFuLuNum,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight != null">#{weight,jdbcType=INTEGER},</if> |
| | | <if test="subName != null">#{subName,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">update |
| | | yeshi_ec_shop_goods_set set sgs_name = |
| | | #{name,jdbcType=VARCHAR},sgs_goods_id = |
| | | #{goods.id,jdbcType=BIGINT},sgs_original_price = |
| | | #{originalPrice,jdbcType=DECIMAL},sgs_zk_price = |
| | | #{zkPrice,jdbcType=DECIMAL},sgs_sales_count = |
| | | #{salesCount,jdbcType=BIGINT},sgs_stock = |
| | | #{stock,jdbcType=INTEGER},sgs_charge_fulu_num = |
| | | #{chargeFuLuNum,jdbcType=VARCHAR},sgs_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sgs_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,sgs_weight |
| | | =#{weight,jdbcType=INTEGER} ,sgs_sub_name =#{subName,jdbcType=VARCHAR} |
| | | ,sgs_state =#{state,jdbcType=INTEGER} where sgs_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"> |
| | | update yeshi_ec_shop_goods_set |
| | | <set> |
| | | <if test="name != null">sgs_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="goods != null">sgs_goods_id=#{goods.id,jdbcType=BIGINT},</if> |
| | | <if test="originalPrice != null">sgs_original_price=#{originalPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="zkPrice != null">sgs_zk_price=#{zkPrice,jdbcType=DECIMAL},</if> |
| | | <if test="salesCount != null">sgs_sales_count=#{salesCount,jdbcType=BIGINT},</if> |
| | | <if test="stock != null">sgs_stock=#{stock,jdbcType=INTEGER},</if> |
| | | <if test="chargeFuLuNum != null">sgs_charge_fulu_num=#{chargeFuLuNum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null">sgs_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sgs_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight !=null">sgs_weight =#{weight,jdbcType=INTEGER},</if> |
| | | <if test="subName !=null">sgs_sub_name =#{subName,jdbcType=VARCHAR},</if> |
| | | <if test="state !=null">sgs_state =#{state,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where sgs_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
| | | <id column="sgs_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sgs_name" property="name" jdbcType="VARCHAR" />
|
| | | <result column="sgs_original_price" property="originalPrice"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="sgs_zk_price" property="zkPrice" jdbcType="DECIMAL" />
|
| | | <result column="sgs_sales_count" property="salesCount"
|
| | | jdbcType="BIGINT" />
|
| | | <result column="sgs_stock" property="stock" jdbcType="INTEGER" />
|
| | | <result column="sgs_charge_fulu_num" property="chargeFuLuNum"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="sgs_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sgs_update_time" property="updateTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sgs_weight" property="weight" jdbcType="INTEGER" />
|
| | | <result column="sgs_sub_name" property="subName" jdbcType="VARCHAR" />
|
| | | <result column="sgs_state" property="state" jdbcType="INTEGER" />
|
| | | <association property="goods" column="sgs_goods_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | <id column="sgs_goods_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | |
|
| | | </resultMap>
|
| | | <resultMap id="BaseResultDetailMap"
|
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
| | | <id column="sgs_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sgs_name" property="name" jdbcType="VARCHAR" />
|
| | | <result column="sgs_original_price" property="originalPrice"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="sgs_zk_price" property="zkPrice" jdbcType="DECIMAL" />
|
| | | <result column="sgs_sales_count" property="salesCount"
|
| | | jdbcType="BIGINT" />
|
| | | <result column="sgs_stock" property="stock" jdbcType="INTEGER" />
|
| | | <result column="sgs_charge_fulu_num" property="chargeFuLuNum"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="sgs_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sgs_update_time" property="updateTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sgs_weight" property="weight" jdbcType="INTEGER" />
|
| | | <result column="sgs_sub_name" property="subName" jdbcType="VARCHAR" />
|
| | | <result column="sgs_state" property="state" jdbcType="INTEGER" />
|
| | | <association property="goods" column="sgs_goods_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | <id column="sgs_goods_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | | <collection property="payList" column="sgs_id"
|
| | | ofType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"
|
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsPayMapper.listByGoodsSetId" />
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sgs_id,sgs_name,sgs_goods_id,sgs_original_price,sgs_zk_price,sgs_sales_count,sgs_stock,sgs_charge_fulu_num,sgs_create_time,sgs_update_time,sgs_weight,sgs_sub_name,sgs_state
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set where sgs_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <select id="selectDetailByPrimaryKey" resultMap="BaseResultDetailMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set where sgs_id = #{0}
|
| | | </select>
|
| | | <select id="listDetailByGoodsId" resultMap="BaseResultDetailMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set where sgs_goods_id = #{0}
|
| | | </select>
|
| | | <select id="countByGoodsId" resultType="java.lang.Long"
|
| | | parameterType="java.lang.Long">select count(*) from yeshi_ec_shop_goods_set where
|
| | | sgs_goods_id = #{0}
|
| | | </select>
|
| | | <select id="listByGoodsId" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set where sgs_goods_id = #{0}
|
| | | </select>
|
| | | |
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | select <include refid="Base_Column_List" /> from yeshi_ec_shop_goods_set |
| | | where sgs_name like '${key}%'
|
| | | order by sgs_weight desc |
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | select count(sgs_id) from yeshi_ec_shop_goods_set |
| | | where sgs_name like '${key}%'
|
| | | </select>
|
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_shop_goods_set where sgs_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_shop_goods_set
|
| | | (sgs_id,sgs_name,sgs_goods_id,sgs_original_price,sgs_zk_price,sgs_sales_count,sgs_stock,sgs_charge_fulu_num,sgs_create_time,sgs_update_time,sgs_weight,sgs_sub_name,sgs_state)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{originalPrice,jdbcType=DECIMAL},#{zkPrice,jdbcType=DECIMAL},#{salesCount,jdbcType=BIGINT},#{stock,jdbcType=INTEGER},#{chargeFuLuNum,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER},#{subName,jdbcType=VARCHAR},#{state,jdbcType=INTEGER})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_shop_goods_set
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sgs_id,</if>
|
| | | <if test="name != null">sgs_name,</if>
|
| | | <if test="goods != null">sgs_goods_id,</if>
|
| | | <if test="originalPrice != null">sgs_original_price,</if>
|
| | | <if test="zkPrice != null">sgs_zk_price,</if>
|
| | | <if test="salesCount != null">sgs_sales_count,</if>
|
| | | <if test="stock != null">sgs_stock,</if>
|
| | | <if test="chargeFuLuNum != null">sgs_charge_fulu_num,</if>
|
| | | <if test="createTime != null">sgs_create_time,</if>
|
| | | <if test="updateTime != null">sgs_update_time,</if>
|
| | | <if test="weight != null">sgs_weight,</if>
|
| | | <if test="subName != null">sgs_sub_name,</if>
|
| | | <if test="state != null">sgs_state,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="goods != null">#{goods.id,jdbcType=BIGINT},</if>
|
| | | <if test="originalPrice != null">#{originalPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="zkPrice != null">#{zkPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="salesCount != null">#{salesCount,jdbcType=BIGINT},</if>
|
| | | <if test="stock != null">#{stock,jdbcType=INTEGER},</if>
|
| | | <if test="chargeFuLuNum != null">#{chargeFuLuNum,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight != null">#{weight,jdbcType=INTEGER},</if>
|
| | | <if test="subName != null">#{subName,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">#{state,jdbcType=INTEGER}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">update
|
| | | yeshi_ec_shop_goods_set set sgs_name =
|
| | | #{name,jdbcType=VARCHAR},sgs_goods_id =
|
| | | #{goods.id,jdbcType=BIGINT},sgs_original_price =
|
| | | #{originalPrice,jdbcType=DECIMAL},sgs_zk_price =
|
| | | #{zkPrice,jdbcType=DECIMAL},sgs_sales_count =
|
| | | #{salesCount,jdbcType=BIGINT},sgs_stock =
|
| | | #{stock,jdbcType=INTEGER},sgs_charge_fulu_num =
|
| | | #{chargeFuLuNum,jdbcType=VARCHAR},sgs_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},sgs_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} ,sgs_weight
|
| | | =#{weight,jdbcType=INTEGER} ,sgs_sub_name =#{subName,jdbcType=VARCHAR}
|
| | | ,sgs_state =#{state,jdbcType=INTEGER} where sgs_id =
|
| | | #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
| | | update yeshi_ec_shop_goods_set
|
| | | <set>
|
| | | <if test="name != null">sgs_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="goods != null">sgs_goods_id=#{goods.id,jdbcType=BIGINT},</if>
|
| | | <if test="originalPrice != null">sgs_original_price=#{originalPrice,jdbcType=DECIMAL},
|
| | | </if>
|
| | | <if test="zkPrice != null">sgs_zk_price=#{zkPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="salesCount != null">sgs_sales_count=#{salesCount,jdbcType=BIGINT},</if>
|
| | | <if test="stock != null">sgs_stock=#{stock,jdbcType=INTEGER},</if>
|
| | | <if test="chargeFuLuNum != null">sgs_charge_fulu_num=#{chargeFuLuNum,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="createTime != null">sgs_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">sgs_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight !=null">sgs_weight =#{weight,jdbcType=INTEGER},</if>
|
| | | <if test="subName !=null">sgs_sub_name =#{subName,jdbcType=VARCHAR},</if>
|
| | | <if test="state !=null">sgs_state =#{state,jdbcType=INTEGER},</if>
|
| | | </set>
|
| | | where sgs_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsPayMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"> |
| | | <id column="sp_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sp_discount" property="disCount" jdbcType="DECIMAL" /> |
| | | <result column="sp_price_hongbao" property="hongBaoPrice" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="sp_price_balance" property="balancePrice" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="sp_price_money" property="moneyPrice" jdbcType="DECIMAL" /> |
| | | <result column="sp_pay_type" property="payType" jdbcType="VARCHAR" /> |
| | | <result column="sp_tag" property="tag" jdbcType="VARCHAR" /> |
| | | <result column="sp_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sp_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="sp_weight" property="weight" jdbcType="INTEGER" /> |
| | | <association property="goodsSet" column="sp_goods_set_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"> |
| | | <id column="sp_goods_set_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="listByGoodsSetId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0} |
| | | </select> |
| | | |
| | | <select id="countByGoodsSetId" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_shop_goods_set_pay |
| | | (sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{disCount,jdbcType=DECIMAL},#{hongBaoPrice,jdbcType=DECIMAL},#{balancePrice,jdbcType=DECIMAL},#{moneyPrice,jdbcType=DECIMAL},#{payType,jdbcType=VARCHAR},#{tag,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_shop_goods_set_pay |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sp_id,</if> |
| | | <if test="goodsSet != null">sp_goods_set_id,</if> |
| | | <if test="disCount != null">sp_discount,</if> |
| | | <if test="hongBaoPrice != null">sp_price_hongbao,</if> |
| | | <if test="balancePrice != null">sp_price_balance,</if> |
| | | <if test="moneyPrice != null">sp_price_money,</if> |
| | | <if test="payType != null">sp_pay_type,</if> |
| | | <if test="tag != null">sp_tag,</if> |
| | | <if test="createTime != null">sp_create_time,</if> |
| | | <if test="updateTime != null">sp_update_time,</if> |
| | | <if test="weight != null">sp_weight,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if> |
| | | <if test="disCount != null">#{disCount,jdbcType=DECIMAL},</if> |
| | | <if test="hongBaoPrice != null">#{hongBaoPrice,jdbcType=DECIMAL},</if> |
| | | <if test="balancePrice != null">#{balancePrice,jdbcType=DECIMAL},</if> |
| | | <if test="moneyPrice != null">#{moneyPrice,jdbcType=DECIMAL},</if> |
| | | <if test="payType != null">#{payType,jdbcType=VARCHAR},</if> |
| | | <if test="tag != null">#{tag,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight != null">#{weight,jdbcType=INTEGER}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">update |
| | | yeshi_ec_shop_goods_set_pay set sp_goods_set_id = |
| | | #{goodsSet.id,jdbcType=BIGINT},sp_discount = |
| | | #{disCount,jdbcType=DECIMAL},sp_price_hongbao = |
| | | #{hongBaoPrice,jdbcType=DECIMAL},sp_price_balance = |
| | | #{balancePrice,jdbcType=DECIMAL},sp_price_money = |
| | | #{moneyPrice,jdbcType=DECIMAL},sp_pay_type = |
| | | #{payType,jdbcType=VARCHAR},sp_tag = |
| | | #{tag,jdbcType=VARCHAR},sp_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sp_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,sp_weight |
| | | =#{weight,jdbcType=INTEGER} where sp_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"> |
| | | update yeshi_ec_shop_goods_set_pay |
| | | <set> |
| | | <if test="goodsSet != null">sp_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if> |
| | | <if test="disCount != null">sp_discount=#{disCount,jdbcType=DECIMAL},</if> |
| | | <if test="hongBaoPrice != null">sp_price_hongbao=#{hongBaoPrice,jdbcType=DECIMAL},</if> |
| | | <if test="balancePrice != null">sp_price_balance=#{balancePrice,jdbcType=DECIMAL},</if> |
| | | <if test="moneyPrice != null">sp_price_money=#{moneyPrice,jdbcType=DECIMAL},</if> |
| | | <if test="payType != null">sp_pay_type=#{payType,jdbcType=VARCHAR},</if> |
| | | <if test="tag != null">sp_tag=#{tag,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">sp_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sp_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="weight !=null">sp_weight =#{weight,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where sp_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsSetsPayMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">
|
| | | <id column="sp_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sp_discount" property="disCount" jdbcType="DECIMAL" />
|
| | | <result column="sp_price_hongbao" property="hongBaoPrice"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="sp_price_balance" property="balancePrice"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="sp_price_money" property="moneyPrice" jdbcType="DECIMAL" />
|
| | | <result column="sp_pay_type" property="payType" jdbcType="VARCHAR" />
|
| | | <result column="sp_tag" property="tag" jdbcType="VARCHAR" />
|
| | | <result column="sp_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sp_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="sp_weight" property="weight" jdbcType="INTEGER" />
|
| | | <association property="goodsSet" column="sp_goods_set_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
| | | <id column="sp_goods_set_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <select id="listByGoodsSetId" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0}
|
| | | </select>
|
| | | |
| | | <select id="countByGoodsSetId" resultType="java.lang.Long"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | count(*)
|
| | | from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0}
|
| | | </select>
|
| | | |
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | select <include refid="Base_Column_List" /> from yeshi_ec_shop_goods_set_pay |
| | | where sp_tag like '${key}%'
|
| | | <if test="payType != null">
|
| | | and sp_pay_type=#{payType}
|
| | | </if>
|
| | | order by sp_weight desc |
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | select count(sp_id) from yeshi_ec_shop_goods_set_pay |
| | | where sp_tag like '${key}%'
|
| | | <if test="payType != null">
|
| | | and sp_pay_type=#{payType}
|
| | | </if>
|
| | | </select>
|
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_shop_goods_set_pay
|
| | | (sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{disCount,jdbcType=DECIMAL},#{hongBaoPrice,jdbcType=DECIMAL},#{balancePrice,jdbcType=DECIMAL},#{moneyPrice,jdbcType=DECIMAL},#{payType,jdbcType=VARCHAR},#{tag,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_shop_goods_set_pay
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sp_id,</if>
|
| | | <if test="goodsSet != null">sp_goods_set_id,</if>
|
| | | <if test="disCount != null">sp_discount,</if>
|
| | | <if test="hongBaoPrice != null">sp_price_hongbao,</if>
|
| | | <if test="balancePrice != null">sp_price_balance,</if>
|
| | | <if test="moneyPrice != null">sp_price_money,</if>
|
| | | <if test="payType != null">sp_pay_type,</if>
|
| | | <if test="tag != null">sp_tag,</if>
|
| | | <if test="createTime != null">sp_create_time,</if>
|
| | | <if test="updateTime != null">sp_update_time,</if>
|
| | | <if test="weight != null">sp_weight,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if>
|
| | | <if test="disCount != null">#{disCount,jdbcType=DECIMAL},</if>
|
| | | <if test="hongBaoPrice != null">#{hongBaoPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="balancePrice != null">#{balancePrice,jdbcType=DECIMAL},</if>
|
| | | <if test="moneyPrice != null">#{moneyPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="payType != null">#{payType,jdbcType=VARCHAR},</if>
|
| | | <if test="tag != null">#{tag,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight != null">#{weight,jdbcType=INTEGER}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">update
|
| | | yeshi_ec_shop_goods_set_pay set sp_goods_set_id =
|
| | | #{goodsSet.id,jdbcType=BIGINT},sp_discount =
|
| | | #{disCount,jdbcType=DECIMAL},sp_price_hongbao =
|
| | | #{hongBaoPrice,jdbcType=DECIMAL},sp_price_balance =
|
| | | #{balancePrice,jdbcType=DECIMAL},sp_price_money =
|
| | | #{moneyPrice,jdbcType=DECIMAL},sp_pay_type =
|
| | | #{payType,jdbcType=VARCHAR},sp_tag =
|
| | | #{tag,jdbcType=VARCHAR},sp_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},sp_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} ,sp_weight
|
| | | =#{weight,jdbcType=INTEGER} where sp_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">
|
| | | update yeshi_ec_shop_goods_set_pay
|
| | | <set>
|
| | | <if test="goodsSet != null">sp_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if>
|
| | | <if test="disCount != null">sp_discount=#{disCount,jdbcType=DECIMAL},</if>
|
| | | <if test="hongBaoPrice != null">sp_price_hongbao=#{hongBaoPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="balancePrice != null">sp_price_balance=#{balancePrice,jdbcType=DECIMAL},</if>
|
| | | <if test="moneyPrice != null">sp_price_money=#{moneyPrice,jdbcType=DECIMAL},</if>
|
| | | <if test="payType != null">sp_pay_type=#{payType,jdbcType=VARCHAR},</if>
|
| | | <if test="tag != null">sp_tag=#{tag,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">sp_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">sp_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight !=null">sp_weight =#{weight,jdbcType=INTEGER},</if>
|
| | | </set>
|
| | | where sp_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserMoneyExtraMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserMoneyExtra"> |
| | | <id column="um_uid" property="uid" jdbcType="BIGINT"/> |
| | | <result column="um_tlj" property="tlj" jdbcType="DECIMAL"/> |
| | | <result column="um_tlj_self" property="tljSelf" jdbcType="DECIMAL"/> |
| | | <result column="um_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="um_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">um_uid,um_tlj,um_tlj_self,um_create_time,um_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_user_money_extra where um_uid = #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_money_extra where um_uid = #{uid,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra" useGeneratedKeys="true" keyProperty="uid">insert into yeshi_ec_user_money_extra (um_uid,um_tlj,um_tlj_self,um_create_time,um_update_time) values (#{uid,jdbcType=BIGINT},#{tlj,jdbcType=DECIMAL},#{tljSelf,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra" useGeneratedKeys="true" keyProperty="uid">insert into yeshi_ec_user_money_extra |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="uid != null">um_uid,</if> |
| | | <if test="tlj != null">um_tlj,</if> |
| | | <if test="tljSelf != null">um_tlj_self,</if> |
| | | <if test="createTime != null">um_create_time,</if> |
| | | <if test="updateTime != null">um_update_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="tlj != null">#{tlj,jdbcType=DECIMAL},</if> |
| | | <if test="tljSelf != null">#{tljSelf,jdbcType=DECIMAL},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra">update yeshi_ec_user_money_extra set um_tlj = #{tlj,jdbcType=DECIMAL},um_tlj_self = #{tljSelf,jdbcType=DECIMAL},um_create_time = #{createTime,jdbcType=TIMESTAMP},um_update_time = #{updateTime,jdbcType=TIMESTAMP} where um_uid = #{uid,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra">update yeshi_ec_user_money_extra |
| | | <set> |
| | | <if test="tlj != null">um_tlj=#{tlj,jdbcType=DECIMAL},</if> |
| | | <if test="tljSelf != null">um_tlj_self=#{tljSelf,jdbcType=DECIMAL},</if> |
| | | <if test="createTime != null">um_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">um_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where um_uid = #{uid,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserMoneyExtraMapper">
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserMoneyExtra">
|
| | | <id column="um_uid" property="uid" jdbcType="BIGINT"/>
|
| | | <result column="um_tlj" property="tlj" jdbcType="DECIMAL"/>
|
| | | <result column="um_tlj_self" property="tljSelf" jdbcType="DECIMAL"/>
|
| | | <result column="um_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="um_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">um_uid,um_tlj,um_tlj_self,um_create_time,um_update_time</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_user_money_extra where um_uid = #{uid,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_money_extra where um_uid = #{uid,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra" useGeneratedKeys="true" keyProperty="uid">insert into yeshi_ec_user_money_extra (um_uid,um_tlj,um_tlj_self,um_create_time,um_update_time) values (#{uid,jdbcType=BIGINT},#{tlj,jdbcType=DECIMAL},#{tljSelf,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra" useGeneratedKeys="true" keyProperty="uid">insert into yeshi_ec_user_money_extra
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="uid != null">um_uid,</if>
|
| | | <if test="tlj != null">um_tlj,</if>
|
| | | <if test="tljSelf != null">um_tlj_self,</if>
|
| | | <if test="createTime != null">um_create_time,</if>
|
| | | <if test="updateTime != null">um_update_time,</if>
|
| | | </trim>values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="tlj != null">#{tlj,jdbcType=DECIMAL},</if>
|
| | | <if test="tljSelf != null">#{tljSelf,jdbcType=DECIMAL},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra">update yeshi_ec_user_money_extra set um_tlj = #{tlj,jdbcType=DECIMAL},um_tlj_self = #{tljSelf,jdbcType=DECIMAL},um_create_time = #{createTime,jdbcType=TIMESTAMP},um_update_time = #{updateTime,jdbcType=TIMESTAMP} where um_uid = #{uid,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserMoneyExtra">update yeshi_ec_user_money_extra
|
| | | <set>
|
| | | <if test="tlj != null">um_tlj=#{tlj,jdbcType=DECIMAL},</if>
|
| | | <if test="tljSelf != null">um_tlj_self=#{tljSelf,jdbcType=DECIMAL},</if>
|
| | | <if test="createTime != null">um_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">um_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where um_uid = #{uid,jdbcType=BIGINT}
|
| | | </update>
|
| | | |
| | | <select id="listValid" resultMap="BaseResultMap">
|
| | | SELECT d.`um_uid`,d.`um_tlj`,CEIL(d.`um_tlj`/10)AS um_tlj_self FROM `yeshi_ec_user_money_extra` d
|
| | | WHERE d.`um_tlj` > 0
|
| | | LIMIT #{start},#{count}
|
| | | </select>
|
| | | |
| | | </mapper>
|
| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsTB(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | |
| | | String searchKey = brandInfo.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
| | | // 添加店铺
|
| | | String shopTitle = goods.getShopTitle();
|
| | | if (addShop && !StringUtil.isNullOrEmpty(shopTitle) && shopTitle.contains("旗舰店")
|
| | | && shopTitle.contains(brandInfo.getName())) {
|
| | | addShop = brandShopCaheService.addBrandShopTB(brandInfo.getId(), goods.getAuctionId(),
|
| | | && shopTitle.toLowerCase().contains(shopKey.toLowerCase())) {
|
| | | addShop = brandShopCaheService.addBrandShopTB(brandInfo, goods.getAuctionId(),
|
| | | goods.getSellerId());
|
| | | }
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsJD(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | |
| | | String searchKey = brandInfo.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
| | | if (addShop && shopInfo != null) {
|
| | | // 包含该品牌名称
|
| | | String shopName = shopInfo.getShopName();
|
| | | if (!StringUtil.isNullOrEmpty(shopName) && shopName.contains(brandInfo.getName())) {
|
| | | if (!StringUtil.isNullOrEmpty(shopName) && shopName.toLowerCase().contains(shopKey.toLowerCase())) {
|
| | | addShop = false;
|
| | | brandShopCaheService.addBrandShopJD(brandInfo, shopInfo);
|
| | | }
|
| | |
| | | if (StringUtil.isNullOrEmpty(name))
|
| | | throw new BrandInfoException(1, "名称不能为空");
|
| | |
|
| | | String shopKey = record.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | record.setShopKey(name);
|
| | | |
| | | String searchKey = record.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | record.setSearchKey(name);
|
| | |
| | |
|
| | | if (picture != null && picture.trim().length() > 0) {
|
| | | // 删除老图
|
| | | if (picture != null && picture.trim().length() > 0 && !Constant.IS_TEST) {
|
| | | COSManager.getInstance().deleteFile(picture);
|
| | | if (resultObj.getIcon() != null && resultObj.getIcon().trim().length() > 0 && !Constant.IS_TEST) {
|
| | | COSManager.getInstance().deleteFile(resultObj.getIcon());
|
| | | };
|
| | | // 存储新图
|
| | | record.setIcon(picture);
|
| | |
| | | return brandInfoMapper.listValidByCidToApp(cid);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "brandCache", key = "'listValidToApp-'+#start+'-'+#start +'-'+#cid")
|
| | | // @Cacheable(value = "brandCache", key = "'listValidToApp-'+#start+'-'+#start +'-'+#cid")
|
| | | @Override
|
| | | public List<BrandInfoVO> listValidToApp(long start, int count, Long cid) {
|
| | | List<BrandInfoVO> list = brandInfoMapper.listBrandInfoVO(start, count, cid);
|
| | |
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public boolean addBrandShopTB(Long brandId, Long auctionId, Long sellerId) {
|
| | | public boolean addBrandShopTB(BrandInfo brandInfo, Long auctionId, Long sellerId) {
|
| | | TaoBaoShop taoBaoShop = taoBaoShopService.getTaoBaoShop(auctionId, sellerId);
|
| | | if (taoBaoShop == null)
|
| | | return true;
|
| | |
|
| | | ShopInfoVO shopInfoVO = ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop);
|
| | | shopInfoVO.setShopIcon(brandInfo.getIcon());
|
| | | |
| | | BrandShopCahe brandShop = new BrandShopCahe();
|
| | | brandShop.setBrandId(brandId);
|
| | | brandShop.setBrandId(brandInfo.getId());
|
| | | brandShop.setShop(ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop));
|
| | | brandShop.setCreateTime(new Date());
|
| | | brandShopCaheDao.insert(brandShop);
|
| | |
| | | */
|
| | | @Override
|
| | | public void addBrandShopPDD(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | |
| | | String searchKey = brandInfo.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
| | | for (PDDGoodsDetail goods : goodsList) {
|
| | | // 包含店铺id 、包含品牌名称
|
| | | String mallName = goods.getMallName();
|
| | | if(addShop && !StringUtil.isNullOrEmpty(mallName) && mallName.contains(brandInfo.getName()) |
| | | if(addShop && !StringUtil.isNullOrEmpty(mallName) && mallName.toLowerCase().contains(shopKey.toLowerCase()) |
| | | && goods.getMallId() != null){
|
| | | shopInfoVO = new ShopInfoVO();
|
| | | shopInfoVO.setId(goods.getMallId().toString());
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void addTaoLiJin(Long uid, BigDecimal money, boolean canSelf) {
|
| | | if (uid == null || money == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | UserMoneyExtra record = new UserMoneyExtra();
|
| | | record.setUid(uid);
|
| | | |
| | | UserMoneyExtra existExtra = userMoneyExtraMapper.selectByPrimaryKey(record.getUid());
|
| | | if (existExtra == null) {
|
| | | record.setTlj(money);
|
| | | |
| | | if (canSelf) {
|
| | | record.setTljSelf(money);
|
| | | } else {
|
| | | record.setTljSelf(new BigDecimal(0));
|
| | | }
|
| | | |
| | | record.setCreateTime(new Date());
|
| | | record.setUpdateTime(new Date());
|
| | | userMoneyExtraMapper.insertSelective(record);
|
| | | } else {
|
| | | BigDecimal tlj = existExtra.getTlj();
|
| | | record.setTlj(MoneyBigDecimalUtil.add(tlj, money));
|
| | | |
| | | if (canSelf) {
|
| | | BigDecimal tljSelf = existExtra.getTljSelf();
|
| | | record.setTljSelf(MoneyBigDecimalUtil.add(tljSelf, money));
|
| | | }
|
| | | |
| | | record.setUpdateTime(new Date());
|
| | | userMoneyExtraMapper.updateByPrimaryKeySelective(record); |
| | | }
|
| | | public void listValid(int page, int count) {
|
| | | userMoneyExtraMapper.listValid((page-1) * count, count);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }else if (detail.getType() == MsgTypeOtherTypeEnum.systemGive) {
|
| | | msgOtherDetailMapper.insertSelective(detail);
|
| | | userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | } else if (detail.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) {
|
| | | msgOtherDetailMapper.insertSelective(detail);
|
| | | userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void taoLiJinExchangeMsg(Long uid, String beiZhu, MsgOtherRewardIntegralDTO dto) {
|
| | | try {
|
| | | MsgOtherDetail detail = new MsgOtherDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setContent(new Gson().toJson(dto));
|
| | | detail.setType(MsgTypeOtherTypeEnum.taoLiJinExchange);
|
| | | msgOtherDetailService.addMsgOtherDetail(detail);
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | // 上一级的奖励
|
| | | UserInfo boss = threeSaleSerivce.getBoss(uid);
|
| | | if(boss != null) {
|
| | | firstReward(uid, source, orderNo);
|
| | | bossReward(boss.getId(), uid, source, orderNo);
|
| | | }
|
| | | }
|
| | |
| | | firstSharedOrderRewardToBoss(uid, teamUid, source, orderNo);
|
| | | firstSharedOrderRewardTheMonthToBoss(uid, teamUid, source, orderNo);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 被邀请人下首单返利(下单就给):
|
| | | * 完成首笔订单 (已到账) 首单=不限制金额、不限制商品、不限制数量、不限制订单类型)
|
| | | * @param uid
|
| | | * @param source
|
| | | * @param orderNo
|
| | | * @param bossId
|
| | | */
|
| | | @Transactional
|
| | | private void firstReward(Long uid, Integer source, String orderNo) throws Exception{
|
| | | // 奖励一次
|
| | | long total = redPackWinInviteMapper.countByUidAndType(uid, RedPackWinInviteTypeEnum.newUserReward.name());
|
| | | if (total > 0)
|
| | | return;
|
| | | |
| | | // 1、判断是否用户首个订单
|
| | | CommonOrderVO order = commonOrderService.firstValidOrderByUid(uid);
|
| | | if (order == null || source != order.getSourceType() || !orderNo.equals(order.getOrderNo())) |
| | | return;
|
| | | |
| | | // 金额
|
| | | BigDecimal money = new BigDecimal(redPackConfigService.getValueByKey("new_user_first_order"));
|
| | | |
| | | // 3、获得红包记录
|
| | | RedPackWinInvite winInvite = new RedPackWinInvite();
|
| | | winInvite.setCreateTime(new Date());
|
| | | winInvite.setUpdateTime(new Date());
|
| | | winInvite.setType(RedPackWinInviteTypeEnum.newUserReward);
|
| | | winInvite.setUid(uid);
|
| | | winInvite.setTeamUid(null);
|
| | | winInvite.setMoney(money);
|
| | | winInvite.setSource(source);
|
| | | winInvite.setOrderNo(orderNo);
|
| | | redPackWinInviteMapper.insertSelective(winInvite);
|
| | | |
| | | // 4、增加红包
|
| | | redPackBalanceService.addRedPack(uid, money, RedPackDetailFactory.createNewUserReward(winInvite));
|
| | | |
| | | //消息
|
| | | MsgRedPackAddContentDTO dto = new MsgRedPackAddContentDTO();
|
| | | dto.setTitle("红包增加");
|
| | | dto.setMoney("¥" + money.setScale(2));
|
| | | dto.setBalance("¥" + redPackBalanceService.getBalance(uid).setScale(2));
|
| | | userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackNewUserReward, new Gson().toJson(dto), "红包可用于购买会员");
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 上级奖励:被邀请人完成首笔分享订单 (已到账)
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.redpack;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.mongodb.redpack.RedPackWinNewUserDao;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackWinNewUser;
|
| | | import com.yeshi.fanli.service.inter.money.msg.UserMoneyMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackConfigService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackWinNewUserService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
|
| | | import com.yeshi.fanli.util.factory.RedPackDetailFactory;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinDetailVO;
|
| | |
|
| | | @Service
|
| | | public class RedPackWinNewUserServiceImpl implements RedPackWinNewUserService {
|
| | |
|
| | | @Resource
|
| | | private RedPackWinNewUserDao redPackWinNewUserDao;
|
| | | |
| | | @Resource
|
| | | private RedPackConfigService redPackConfigService;
|
| | | |
| | | @Resource |
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | | @Resource
|
| | | private RedPackBalanceService redPackBalanceService;
|
| | | |
| | | @Resource
|
| | | private UserMoneyMsgNotificationService userMoneyMsgNotificationService;
|
| | | |
| | | |
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public RedPackWinDetailVO receiveReward(Long uid) throws Exception {
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra == null || userInfoExtra.getFirstLoginTime() == null) |
| | | return null;
|
| | | |
| | | Date nowTime = new Date();
|
| | | Date firstLoginTime = userInfoExtra.getFirstLoginTime();
|
| | | int days = DateUtil.daysBetween2(firstLoginTime, nowTime);
|
| | | if (days > Constant.RED_PACK_NEW_USER_DAYS)
|
| | | return null; // 已经超出设置天数
|
| | | |
| | | RedPackWinNewUser redPackWin = redPackWinNewUserDao.getByUid(uid);
|
| | | if (redPackWin != null) {
|
| | | if (redPackWin.getMoney().compareTo(Constant.RED_PACK_NEW_USER_MONEY) >= 0)
|
| | | return null; // 已领取完
|
| | | |
| | | Date updateTime = redPackWin.getUpdateTime();
|
| | | int daysNum = DateUtil.daysBetween2(updateTime, nowTime);
|
| | | if (daysNum == 0) |
| | | return null; // 今日已领取
|
| | | |
| | | Integer num = redPackWin.getNum();
|
| | | if (num >= Constant.RED_PACK_NEW_USER_DAYS) |
| | | return null; // 领取次数超限
|
| | | }
|
| | | |
| | | BigDecimal money = null;
|
| | | if (redPackWin == null) { // 第一次
|
| | | if (days == Constant.RED_PACK_NEW_USER_DAYS) { // 最后一天
|
| | | money = Constant.RED_PACK_NEW_USER_MONEY;
|
| | | } else { // 计算随机奖励
|
| | | double randomNum = Constant.RED_PACK_NEW_USER_MIN + Math.random() * (Constant.RED_PACK_NEW_USER_MAX - Constant.RED_PACK_NEW_USER_MIN);
|
| | | BigDecimal rate = new BigDecimal(randomNum/100).setScale(2);
|
| | | money = MoneyBigDecimalUtil.mul(Constant.RED_PACK_NEW_USER_MONEY,rate);
|
| | | }
|
| | | } else if (days == Constant.RED_PACK_NEW_USER_DAYS) { // 最后一天
|
| | | money = MoneyBigDecimalUtil.sub(Constant.RED_PACK_NEW_USER_MONEY, redPackWin.getMoney());
|
| | | } else { // 计算剩余随机奖励 10%-25% |
| | | double randomNum = 10 + Math.random() * (20 - 10);
|
| | | BigDecimal rate = new BigDecimal(randomNum/100).setScale(2);
|
| | | money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.sub(Constant.RED_PACK_NEW_USER_MONEY,redPackWin.getMoney()),rate);
|
| | | }
|
| | | |
| | | int num = 1;
|
| | | money = money.setScale(2);
|
| | | if (redPackWin == null) {
|
| | | redPackWin = new RedPackWinNewUser();
|
| | | redPackWin.setNum(1);
|
| | | redPackWin.setMoney(money);
|
| | | redPackWin.setUid(uid.toString());
|
| | | redPackWin.setCreateTime(nowTime);
|
| | | redPackWin.setUpdateTime(nowTime);
|
| | | } else {
|
| | | num = redPackWin.getNum() + 1;
|
| | | redPackWin = new RedPackWinNewUser();
|
| | | redPackWin.setUid(uid.toString());
|
| | | redPackWin.setNum(num);
|
| | | redPackWin.setMoney(MoneyBigDecimalUtil.add(money, redPackWin.getMoney()));
|
| | | redPackWin.setUpdateTime(nowTime);
|
| | | }
|
| | | redPackWinNewUserDao.save(redPackWin);
|
| | | |
| | | // 4、增加红包
|
| | | redPackBalanceService.addRedPack(uid, money, RedPackDetailFactory.createNewUserReward(uid,num, money));
|
| | | |
| | | RedPackWinDetailVO winDetailVO = new RedPackWinDetailVO();
|
| | | winDetailVO.setTitle("新人红包");
|
| | | winDetailVO.setBless("恭喜你!已领" + num + "/" + Constant.RED_PACK_NEW_USER_DAYS + "次");
|
| | | winDetailVO.setMoney(money.toString());
|
| | | winDetailVO.setDesc("领取成功,已存入“我的-红包”");
|
| | | winDetailVO.setTips(redPackConfigService.getValueByKey("new_user_win_tips"));
|
| | | return winDetailVO;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.shop;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsClassMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsClass;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsClassException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsClassService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class BanLiShopGoodsClassServiceImpl implements BanLiShopGoodsClassService {
|
| | |
| | | return banLiShopGoodsClassMapper.selectByPrimaryKey(id);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<BanLiShopGoodsClass> listAllGoodsClass() {
|
| | | return banLiShopGoodsClassMapper.listAllGoodsClass();
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<BanLiShopGoodsClass> listGoodsClass(int page, int pageSize, String key) {
|
| | | return banLiShopGoodsClassMapper.listGoodsClass((page - 1) * pageSize, pageSize, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countGoodsClass(String key) {
|
| | | return banLiShopGoodsClassMapper.countGoodsClass(key);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void save( BanLiShopGoodsClass record) throws BanLiShopGoodsClassException {
|
| | | String name = record.getName();
|
| | | if (StringUtil.isNullOrEmpty(name))
|
| | | throw new BanLiShopGoodsClassException(1, "名称不能为空");
|
| | |
|
| | | record.setUpdateTime(new Date());
|
| | | if (record.getId() == null) {
|
| | | record.setCreateTime(new Date());
|
| | | banLiShopGoodsClassMapper.insert(record);
|
| | | } else {
|
| | | BanLiShopGoodsClass resultObj = banLiShopGoodsClassMapper.selectByPrimaryKey(record.getId());
|
| | | if (resultObj == null)
|
| | | throw new BanLiShopGoodsClassException(1, "修改内容已不存在");
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(record.getPicture())) {
|
| | | record.setPicture(resultObj.getPicture());
|
| | | } else if (!StringUtil.isNullOrEmpty(resultObj.getPicture())) {
|
| | | COSManager.getInstance().deleteFile(resultObj.getPicture());
|
| | | }
|
| | | record.setCreateTime(resultObj.getCreateTime());
|
| | | banLiShopGoodsClassMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void delete(List<Long> idsList) {
|
| | | if (idsList != null)
|
| | | for (Long id : idsList)
|
| | | banLiShopGoodsClassMapper.deleteByPrimaryKey(id);
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | return;
|
| | | if (goods.getUpdateTime() == null)
|
| | | goods.setUpdateTime(new Date());
|
| | | |
| | | banLiShopGoodsMapper.updateByPrimaryKeySelective(goods);
|
| | | }
|
| | |
|
| | | @Transactional
|
| | |
| | | banLiShopGoodsSetsPayMapper.deleteByPrimaryKey(id);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType) {
|
| | | return banLiShopGoodsSetsPayMapper.listQuery((page - 1) * pageSize, pageSize, key, payType);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key, Integer payType) {
|
| | | return banLiShopGoodsSetsPayMapper.countQuery(key, payType);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | banLiShopGoodsSetPayService.deleteByPrimaryKey(pay.getId());
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key) {
|
| | | return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | return banLiShopGoodsSetsMapper.countQuery(key);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.user.integral;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.text.ParseException;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | |
| | | }
|
| | | userOtherMsgNotificationService.firstOrderRewardMsg(uid, null, msgOther);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 推广红包折算金币
|
| | | * @param uid
|
| | | * @param addGoldCoin
|
| | | * @param tlj
|
| | | */
|
| | | @Override
|
| | | public void taoLiJinExchange(Long uid, Integer addGoldCoin, BigDecimal tlj) {
|
| | | String uniqueKey = "taoLiJinExchange-" + uid.toString();
|
| | | IntegralDetail detailRecord = integralDetailService.getDetailByUniqueKey(uniqueKey);
|
| | | if (detailRecord != null)
|
| | | return;
|
| | |
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getByUidForUpdate(uid);
|
| | | if (userInfoExtra == null)
|
| | | return;
|
| | |
|
| | | Integer goldCoin = userInfoExtra.getGoldCoin();
|
| | | if (goldCoin == null)
|
| | | goldCoin = 0;
|
| | | goldCoin = goldCoin + addGoldCoin;
|
| | |
|
| | | try {
|
| | | UserInfoExtra extra = new UserInfoExtra();
|
| | | extra.setId(userInfoExtra.getId());
|
| | | extra.setGoldCoin(goldCoin);
|
| | | userInfoExtraService.saveUserInfoExtra(extra);
|
| | | } catch (UserInfoExtraException e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | return;
|
| | | }
|
| | |
|
| | | // 金币详情
|
| | | IntegralDetail detail = new IntegralDetail();
|
| | | detail.setTitle("推广红包下线-系统折算成金币");
|
| | | detail.setUid(uid);
|
| | | detail.setMoney(addGoldCoin);
|
| | | detail.setUniqueKey(uniqueKey);
|
| | | detail.setCreateTime(new Date());
|
| | | integralDetailService.insertSelective(detail);
|
| | |
|
| | | // 消息
|
| | | MsgOtherRewardIntegralDTO msgOther = new MsgOtherRewardIntegralDTO();
|
| | | msgOther.setTitle("推广红包");
|
| | | msgOther.setTotal("推广红包¥" + tlj.setScale(2));
|
| | | msgOther.setNum(goldCoin + "枚");
|
| | | msgOther.setSource("已进入到可用金币中");
|
| | | msgOther.setExplain("原推广红包功能下线,剩余推广红包按照10:1折算为金币 ");
|
| | | userOtherMsgNotificationService.taoLiJinExchangeMsg(uid, "本折算有且仅有一次", msgOther);
|
| | | }
|
| | | }
|
| | |
| | | * @param auctionId
|
| | | * @param sellerId
|
| | | */
|
| | | public boolean addBrandShopTB(Long brandId, Long auctionId, Long sellerId);
|
| | | public boolean addBrandShopTB(BrandInfo brandInfo, Long auctionId, Long sellerId);
|
| | |
|
| | | /**
|
| | | * 添加京东店铺信息
|
| | |
| | | package com.yeshi.fanli.service.inter.money;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | |
|
| | | public interface UserMoneyExtraService {
|
| | |
| | | */
|
| | | public void updateByPrimaryKeySelective(UserMoneyExtra record);
|
| | |
|
| | | /**
|
| | | * 用户获得推广金
|
| | | * @param uid
|
| | | * @param money
|
| | | * @param canSelf
|
| | | */
|
| | | public void addTaoLiJin(Long uid, BigDecimal money, boolean canSelf);
|
| | |
|
| | | public void listValid(int page, int count);
|
| | | }
|
| | |
| | | */
|
| | | public void systemGiveRewardCoupon(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto);
|
| | |
|
| | | /**
|
| | | * 淘礼金兑换成金币消息
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @param dto
|
| | | */
|
| | | public void taoLiJinExchangeMsg(Long uid, String beiZhu, MsgOtherRewardIntegralDTO msgOther);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.redpack;
|
| | |
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinDetailVO;
|
| | |
|
| | | public interface RedPackWinNewUserService {
|
| | |
|
| | | /**
|
| | | * 领取红包 |
| | | * @param uid
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public RedPackWinDetailVO receiveReward(Long uid) throws Exception;
|
| | |
|
| | | |
| | | |
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.shop;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsClass;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsClassException;
|
| | |
|
| | | /**
|
| | | * 板栗商城商品分类服务
|
| | |
| | |
|
| | | public BanLiShopGoodsClass selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 查询所有分类
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsClass> listAllGoodsClass();
|
| | |
|
| | | /**
|
| | | * 查询列表
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsClass> listGoodsClass(int page, int pageSize, String key);
|
| | |
|
| | | public long countGoodsClass(String key);
|
| | |
|
| | | /**
|
| | | * 增加
|
| | | * @param record
|
| | | * @throws BanLiShopGoodsClassException
|
| | | */
|
| | | public void save(BanLiShopGoodsClass record) throws BanLiShopGoodsClassException;
|
| | |
|
| | | /**
|
| | | * 主键
|
| | | * @param idsList
|
| | | */
|
| | | public void delete(List<Long> idsList);
|
| | |
|
| | | }
|
| | |
| | | * @param id
|
| | | */
|
| | | public void deleteByPrimaryKey(Long id);
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public void deleteByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 查询表
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @param payType
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType);
|
| | |
|
| | | public long countQuery(String key, Integer payType);
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public void deleteByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key);
|
| | |
|
| | | public long countQuery(String key);
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user.integral;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
| | | */
|
| | | public long getTotalGoldCoinByUid(Long uid);
|
| | |
|
| | | /**
|
| | | * 推广红包折算金币
|
| | | * @param uid
|
| | | * @param addGoldCoin
|
| | | * @param tlj
|
| | | */
|
| | | public void taoLiJinExchange(Long uid, Integer addGoldCoin, BigDecimal tlj);
|
| | |
|
| | | }
|
| | |
| | | // 红包奖励-单位时间类累计产生≥200金币
|
| | | public static final long RED_PACK_GOLD_COIN = 200;
|
| | |
|
| | | // 新人奖励连续天数
|
| | | public static final long RED_PACK_NEW_USER_DAYS = 7;
|
| | | // 新人奖励最高
|
| | | public static final BigDecimal RED_PACK_NEW_USER_MONEY = new BigDecimal("2");
|
| | | // 新人奖励第一次随机最小
|
| | | public static final int RED_PACK_NEW_USER_MIN = 50;
|
| | | // 新人奖励第一次随机最大
|
| | | public static final int RED_PACK_NEW_USER_MAX = 60;
|
| | | |
| | |
|
| | |
|
| | | public static WXGZConfig wxGZConfig;
|
| | |
| | | * @return
|
| | | * @throws RedPackDetailException
|
| | | */
|
| | | public static RedPackDetail createNewUserReward(RedPackWinInvite winInvite) throws RedPackDetailException {
|
| | | if (winInvite == null)
|
| | | public static RedPackDetail createNewUserReward(Long uid, Integer num, BigDecimal money) throws RedPackDetailException {
|
| | | if (uid == null || num == null || money == null)
|
| | | throw new RedPackDetailException(1, "获得记录不能为空");
|
| | |
|
| | | // 红包明细- 退回红包
|
| | | RedPackDetail detail = new RedPackDetail();
|
| | | detail.setDisplay(true);
|
| | | detail.setUid(winInvite.getUid());
|
| | | detail.setMoney(winInvite.getMoney());
|
| | | detail.setDescInfo("完成首笔订单");
|
| | | detail.setUid(uid);
|
| | | detail.setMoney(money);
|
| | | detail.setDescInfo("签到红包");
|
| | | detail.setTitle(RedPackDetailTypeEnum.newUserReward.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.newUserReward);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.newUserReward.name() + ":" + winInvite.getId()));
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.newUserReward.name() + ":" + uid +"_" + num));
|
| | | detail.setCreateTime(new Date());
|
| | | return detail;
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.vo.redpack;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | public class RedPackWinDetailVO {
|
| | | @Expose
|
| | | private String title;
|
| | | @Expose
|
| | | private String bless;
|
| | | @Expose
|
| | | private String money;
|
| | | @Expose
|
| | | private String desc;
|
| | | @Expose
|
| | | private String tips;
|
| | | // 跳转
|
| | | @Expose
|
| | | private String params;
|
| | | @Expose
|
| | | private Object jumpDetail;
|
| | | |
| | | |
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | | public String getBless() {
|
| | | return bless;
|
| | | }
|
| | | public void setBless(String bless) {
|
| | | this.bless = bless;
|
| | | }
|
| | | public String getMoney() {
|
| | | return money;
|
| | | }
|
| | | public void setMoney(String money) {
|
| | | this.money = money;
|
| | | }
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | public void setDesc(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | | public String getTips() {
|
| | | return tips;
|
| | | }
|
| | | public void setTips(String tips) {
|
| | | this.tips = tips;
|
| | | }
|
| | | public String getParams() {
|
| | | return params;
|
| | | }
|
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | | public Object getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | | public void setJumpDetail(Object jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | | }
|
| | |
|