Merge remote-tracking branch 'origin/div' into div
| | |
| | | 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.entity.shop.BanLiShopGoodsClass;
|
| | | 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.BanLiShopGoodsClassService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsService banLiShopGoodsService;
|
| | | |
| | | @Resource
|
| | | private BanLiShopGoodsClassService banLiShopGoodsClassService;
|
| | |
|
| | | /**
|
| | | * 保存信息
|
| | |
| | | @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);
|
| | | banLiShopGoodsService.saveObject(fileRequest.getFile("file"),fileRequest.getFile("file2"), record);
|
| | | } else {
|
| | | banLiShopGoodsService.saveObject(null, null,record);
|
| | | }
|
| | | 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) {
|
| | | e.printStackTrace();
|
| | | 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();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | for (BanLiShopGoods shopGoods: list) {
|
| | | BanLiShopGoodsClass goodsClass = shopGoods.getGoodsClass();
|
| | | if (goodsClass != null) {
|
| | | shopGoods.setGoodsClass(banLiShopGoodsClassService.selectByPrimaryKey(goodsClass.getId()));
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | long count = banLiShopGoodsService.countGoods(key, state);
|
| | |
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | |
|
| | | |
| | | /**
|
| | | * 保存信息
|
| | | * |
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BanLiShopGoodsSets record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | banLiShopGoodsSetService.saveObject(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BanLiShopGoodsSetException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Long goodsId, 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);
|
| | | List<BanLiShopGoodsSets> list = banLiShopGoodsSetService.listQuery(pageIndex, pageSize, key, goodsId);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = banLiShopGoodsSetService.countQuery(key);
|
| | | long count = banLiShopGoodsSetService.countQuery(key, goodsId);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | 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.entity.shop.BanLiShopGoodsSetsPay;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetPayException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
|
| | | 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;
|
| | |
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsSetPayService banLiShopGoodsSetPayService;
|
| | | |
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | | |
| | | |
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BanLiShopGoodsSetsPay record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | banLiShopGoodsSetPayService.saveObject(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BanLiShopGoodsSetPayException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer payType, PrintWriter out) {
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, Long setId, 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);
|
| | | List<BanLiShopGoodsSetsPay> list = banLiShopGoodsSetPayService.listQuery(pageIndex, pageSize, key, payType, setId);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = banLiShopGoodsSetPayService.countQuery(key, payType);
|
| | | for (BanLiShopGoodsSetsPay setsPay: list) {
|
| | | BanLiShopGoodsSets goodsSet = setsPay.getGoodsSet();
|
| | | if (goodsSet != null) {
|
| | | setsPay.setGoodsSet(banLiShopGoodsSetService.selectByPrimaryKey(goodsSet.getId()));
|
| | | }
|
| | | }
|
| | | |
| | | long count = banLiShopGoodsSetPayService.countQuery(key, payType, setId);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsSets> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key);
|
| | | List<BanLiShopGoodsSets> listQuery(@Param("start") long start, @Param("count") int count, |
| | | @Param("key") String key, @Param("goodsId")Long goodsId);
|
| | |
|
| | | /**
|
| | | * 计数
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countQuery(@Param("key") String key);
|
| | | long countQuery(@Param("key") String key, @Param("goodsId")Long goodsId);
|
| | | } |
| | |
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopGoodsSetsPay> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key, @Param("payType") Integer payType);
|
| | | List<BanLiShopGoodsSetsPay> listQuery(@Param("start") long start, @Param("count") int count,
|
| | | @Param("key") String key, @Param("payType") Integer payType, @Param("setId")Long setId);
|
| | |
|
| | | /**
|
| | | * 计数
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | long countQuery(@Param("key") String key, @Param("payType") Integer payType);
|
| | | long countQuery(@Param("key") String key, @Param("payType") Integer payType, @Param("setId")Long setId);
|
| | |
|
| | | } |
| | |
| | | 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.BanLiShopOrder; |
| | | |
| | | public interface BanLiShopOrderMapper extends BaseMapper<BanLiShopOrder> { |
| | | |
| | | BanLiShopOrder selectByPrimaryKeyForUpdate(Long id); |
| | | |
| | | /** |
| | | * 根据用户ID检索 |
| | | * |
| | | * @param stateList |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<BanLiShopOrder> listByUidAndState(@Param("stateList") List<Integer> stateList, @Param("uid") Long uid, |
| | | @Param("start") long start, @Param("count") int count); |
| | | |
| | | /** |
| | | * 根据用户ID计数 |
| | | * |
| | | * @param stateList |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | long countByUidAndState(@Param("stateList") List<Integer> stateList, @Param("uid") Long uid); |
| | | |
| | | /** |
| | | * 根据订单号查询 |
| | | * |
| | | * @param orderNo |
| | | * @return |
| | | */ |
| | | BanLiShopOrder selectByOrderNo(String orderNo); |
| | | |
| | | 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.BanLiShopOrder;
|
| | |
|
| | | public interface BanLiShopOrderMapper extends BaseMapper<BanLiShopOrder> {
|
| | |
|
| | | BanLiShopOrder selectByPrimaryKeyForUpdate(Long id);
|
| | |
|
| | | /**
|
| | | * 根据用户ID检索
|
| | | * |
| | | * @param stateList
|
| | | * @param uid
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<BanLiShopOrder> listByUidAndState(@Param("stateList") List<Integer> stateList, @Param("uid") Long uid,
|
| | | @Param("start") long start, @Param("count") int count);
|
| | |
|
| | | /**
|
| | | * 根据用户ID计数
|
| | | * |
| | | * @param stateList
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | long countByUidAndState(@Param("stateList") List<Integer> stateList, @Param("uid") Long uid);
|
| | |
|
| | | /**
|
| | | * 根据订单号查询
|
| | | * |
| | | * @param orderNo
|
| | | * @return
|
| | | */
|
| | | BanLiShopOrder selectByOrderNo(String orderNo);
|
| | |
|
| | | } |
| | |
| | | <?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.homemodule.FloatADMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.FloatAD"> |
| | | <id column="fa_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="fa_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="fa_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="fa_show_mode" property="showMode" jdbcType="VARCHAR" /> |
| | | <result column="fa_params" property="params" jdbcType="VARCHAR" /> |
| | | <result column="fa_jump_need_login" property="jumpNeedLogin" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="fa_start_time" property="startTime" jdbcType="TIMESTAMP" /> |
| | | <result column="fa_end_time" property="endTime" jdbcType="TIMESTAMP" /> |
| | | <result column="fa_position" property="position" jdbcType="VARCHAR" /> |
| | | <result column="fa_order" property="order" jdbcType="INTEGER" /> |
| | | <result column="fa_type" property="type" jdbcType="INTEGER" /> |
| | | <result column="fa_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="fa_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="fa_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="fa_play_sound" property="playSound" jdbcType="BOOLEAN" /> |
| | | <association property="jumpDetail" column="fa_jumpid" |
| | | javaType="com.yeshi.fanli.entity.common.JumpDetailV2"> |
| | | <id column="fa_jumpid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_play_sound |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_float_ad where fa_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_float_ad where fa_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_float_ad |
| | | (fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_id,fa_play_sound) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{showMode,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{position,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{id,jdbcType=BIGINT},#{playSound,jdbcType=BOOLEAN}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_float_ad |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">fa_id,</if> |
| | | <if test="name != null">fa_name,</if> |
| | | <if test="picture != null">fa_picture,</if> |
| | | <if test="showMode != null">fa_show_mode,</if> |
| | | <if test="jumpDetail != null">fa_jumpid,</if> |
| | | <if test="params != null">fa_params,</if> |
| | | <if test="jumpNeedLogin != null">fa_jump_need_login,</if> |
| | | <if test="startTime != null">fa_start_time,</if> |
| | | <if test="endTime != null">fa_end_time,</if> |
| | | <if test="position != null">fa_position,</if> |
| | | <if test="order != null">fa_order,</if> |
| | | <if test="type != null">fa_type,</if> |
| | | <if test="state != null">fa_state,</if> |
| | | <if test="createTime != null">fa_create_time,</if> |
| | | <if test="updateTime != null">fa_update_time,</if> |
| | | <if test="playSound != null">fa_play_sound,</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="showMode != null">#{showMode,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if> |
| | | <if test="jumpNeedLogin != null">#{jumpNeedLogin,jdbcType=VARCHAR},</if> |
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="position != null">#{position,jdbcType=VARCHAR},</if> |
| | | <if test="order != null">#{order,jdbcType=INTEGER},</if> |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</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="playSound != null">#{playSound,jdbcType=BOOLEAN}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD">update |
| | | yeshi_ec_float_ad set fa_name = #{name,jdbcType=VARCHAR},fa_picture = |
| | | #{picture,jdbcType=VARCHAR},fa_show_mode = |
| | | #{showMode,jdbcType=VARCHAR},fa_jumpid = |
| | | #{jumpDetail.id,jdbcType=BIGINT},fa_params = |
| | | #{params,jdbcType=VARCHAR},fa_jump_need_login = |
| | | #{jumpNeedLogin,jdbcType=VARCHAR},fa_start_time = |
| | | #{startTime,jdbcType=TIMESTAMP},fa_end_time = |
| | | #{endTime,jdbcType=TIMESTAMP},fa_position = |
| | | #{position,jdbcType=VARCHAR},fa_order = |
| | | #{order,jdbcType=INTEGER},fa_type = #{type,jdbcType=INTEGER},fa_state |
| | | = #{state,jdbcType=INTEGER},fa_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},fa_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,fa_play_sound |
| | | =#{playSound,jdbcType=BOOLEAN} where fa_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD"> |
| | | update yeshi_ec_float_ad |
| | | <set> |
| | | <if test="name != null">fa_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">fa_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="showMode != null">fa_show_mode=#{showMode,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">fa_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">fa_params=#{params,jdbcType=VARCHAR},</if> |
| | | <if test="jumpNeedLogin != null">fa_jump_need_login=#{jumpNeedLogin,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startTime != null">fa_start_time=#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">fa_end_time=#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="position != null">fa_position=#{position,jdbcType=VARCHAR},</if> |
| | | <if test="order != null">fa_order=#{order,jdbcType=INTEGER},</if> |
| | | <if test="type != null">fa_type=#{type,jdbcType=INTEGER},</if> |
| | | <if test="state != null">fa_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">fa_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">fa_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="playSound !=null">fa_play_sound =#{playSound,jdbcType=BOOLEAN},</if> |
| | | </set> |
| | | where fa_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <delete id="deleteByPrimaryKeyList" parameterType="java.util.List"> |
| | | delete from yeshi_ec_float_ad WHERE fa_id in |
| | | <foreach collection="list" item="item" open="(" separator="," |
| | | close=")">#{item}</foreach> |
| | | </delete> |
| | | <select id="listQuery" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM yeshi_ec_float_ad fd WHERE 1=1 |
| | | <if test="key != null and key !='' ">AND fd.`fa_name` LIKE '%${key}%'</if> |
| | | <if test="state != null">AND fd.`fa_state` = #{state}</if> |
| | | ORDER BY fd.`fa_position`,fd.`fa_order` LIMIT ${start},${count} |
| | | </select> |
| | | <select id="countQuery" resultType="java.lang.Long"> |
| | | SELECT IFNULL(COUNT(fd.`fa_id`),0) FROM yeshi_ec_float_ad fd WHERE 1=1 |
| | | <if test="key != null and key !='' ">AND fd.`fa_name` LIKE '%${key}%'</if> |
| | | <if test="state != null">AND fd.`fa_state` = #{state}</if> |
| | | </select> |
| | | <select id="getMaxOrderByPosition" resultType="java.lang.Integer">SELECT |
| | | IFNULL(MAX(fa_order),0) FROM yeshi_ec_float_ad WHERE fa_position = |
| | | #{position} |
| | | </select> |
| | | <select id="getByAdjoinOrder" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} |
| | | <if test="type == -1">AND |
| | | fd.`fa_order` <![CDATA[<]]> |
| | | #{order} ORDER BY fd.`fa_order` desc |
| | | </if> |
| | | <if test="type == 1">AND |
| | | fd.`fa_order` <![CDATA[>]]> |
| | | #{order} ORDER BY fd.`fa_order` |
| | | </if> |
| | | LIMIT 1 |
| | | </select> |
| | | <select id="countByPosition" resultType="java.lang.Integer">SELECT |
| | | IFNULL(COUNT(fd.`fa_id`),0) FROM yeshi_ec_float_ad fd WHERE |
| | | fd.`fa_position` = #{position} |
| | | </select> |
| | | <select id="ListByPrimaryKey" parameterType="java.util.List" |
| | | resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM yeshi_ec_float_ad WHERE fa_id in |
| | | <foreach collection="list" item="item" open="(" separator="," |
| | | close=")">#{item}</foreach> |
| | | </select> |
| | | <select id="getEffectiveFloatAD" resultMap="BaseResultMap">SELECT |
| | | * FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} AND |
| | | fd.`fa_state` = 1 AND IF(fd.`fa_start_time` IS |
| | | NULL,TRUE,fd.`fa_start_time`<![CDATA[<=]]> |
| | | NOW()) AND IF(fd.`fa_end_time` IS NULL,TRUE,fd.`fa_end_time` <![CDATA[>=]]> |
| | | NOW()) |
| | | <if test="type != null">AND fa_type = #{type}</if> |
| | | ORDER BY fd.`fa_order` LIMIT 1 |
| | | </select> |
| | | <select id="getValidFloatAD" resultMap="BaseResultMap">SELECT |
| | | * FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} AND |
| | | fd.`fa_state` = 1 AND IF(fd.`fa_start_time` IS |
| | | NULL,TRUE,fd.`fa_start_time`<![CDATA[<=]]> |
| | | NOW()) AND IF(fd.`fa_end_time` IS NULL,TRUE,fd.`fa_end_time` <![CDATA[>=]]> |
| | | NOW()) |
| | | <if test="type != null">AND fa_type = #{type}</if> |
| | | ORDER BY fd.`fa_order` |
| | | </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.homemodule.FloatADMapper">
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.FloatAD">
|
| | | <id column="fa_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="fa_name" property="name" jdbcType="VARCHAR" />
|
| | | <result column="fa_picture" property="picture" jdbcType="VARCHAR" />
|
| | | <result column="fa_show_mode" property="showMode" jdbcType="VARCHAR" />
|
| | | <result column="fa_params" property="params" jdbcType="VARCHAR" />
|
| | | <result column="fa_jump_need_login" property="jumpNeedLogin"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="fa_start_time" property="startTime" jdbcType="TIMESTAMP" />
|
| | | <result column="fa_end_time" property="endTime" jdbcType="TIMESTAMP" />
|
| | | <result column="fa_position" property="position" jdbcType="VARCHAR" />
|
| | | <result column="fa_order" property="order" jdbcType="INTEGER" />
|
| | | <result column="fa_type" property="type" jdbcType="INTEGER" />
|
| | | <result column="fa_state" property="state" jdbcType="INTEGER" />
|
| | | <result column="fa_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="fa_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="fa_play_sound" property="playSound" jdbcType="BOOLEAN" />
|
| | | <association property="jumpDetail" column="fa_jumpid"
|
| | | javaType="com.yeshi.fanli.entity.common.JumpDetailV2">
|
| | | <id column="fa_jumpid" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | |
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_play_sound
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_float_ad where fa_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_float_ad where fa_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_float_ad
|
| | | (fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_id,fa_play_sound)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{showMode,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{position,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{id,jdbcType=BIGINT},#{playSound,jdbcType=BOOLEAN})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_float_ad
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">fa_id,</if>
|
| | | <if test="name != null">fa_name,</if>
|
| | | <if test="picture != null">fa_picture,</if>
|
| | | <if test="showMode != null">fa_show_mode,</if>
|
| | | <if test="jumpDetail != null">fa_jumpid,</if>
|
| | | <if test="params != null">fa_params,</if>
|
| | | <if test="jumpNeedLogin != null">fa_jump_need_login,</if>
|
| | | <if test="startTime != null">fa_start_time,</if>
|
| | | <if test="endTime != null">fa_end_time,</if>
|
| | | <if test="position != null">fa_position,</if>
|
| | | <if test="order != null">fa_order,</if>
|
| | | <if test="type != null">fa_type,</if>
|
| | | <if test="state != null">fa_state,</if>
|
| | | <if test="createTime != null">fa_create_time,</if>
|
| | | <if test="updateTime != null">fa_update_time,</if>
|
| | | <if test="playSound != null">fa_play_sound,</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="showMode != null">#{showMode,jdbcType=VARCHAR},</if>
|
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if>
|
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if>
|
| | | <if test="jumpNeedLogin != null">#{jumpNeedLogin,jdbcType=VARCHAR},</if>
|
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="position != null">#{position,jdbcType=VARCHAR},</if>
|
| | | <if test="order != null">#{order,jdbcType=INTEGER},</if>
|
| | | <if test="type != null">#{type,jdbcType=INTEGER},</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="playSound != null">#{playSound,jdbcType=BOOLEAN}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD">update
|
| | | yeshi_ec_float_ad set fa_name = #{name,jdbcType=VARCHAR},fa_picture =
|
| | | #{picture,jdbcType=VARCHAR},fa_show_mode =
|
| | | #{showMode,jdbcType=VARCHAR},fa_jumpid =
|
| | | #{jumpDetail.id,jdbcType=BIGINT},fa_params =
|
| | | #{params,jdbcType=VARCHAR},fa_jump_need_login =
|
| | | #{jumpNeedLogin,jdbcType=VARCHAR},fa_start_time =
|
| | | #{startTime,jdbcType=TIMESTAMP},fa_end_time =
|
| | | #{endTime,jdbcType=TIMESTAMP},fa_position =
|
| | | #{position,jdbcType=VARCHAR},fa_order =
|
| | | #{order,jdbcType=INTEGER},fa_type = #{type,jdbcType=INTEGER},fa_state
|
| | | = #{state,jdbcType=INTEGER},fa_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},fa_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} ,fa_play_sound
|
| | | =#{playSound,jdbcType=BOOLEAN} where fa_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD">
|
| | | update yeshi_ec_float_ad
|
| | | <set>
|
| | | <if test="name != null">fa_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">fa_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="showMode != null">fa_show_mode=#{showMode,jdbcType=VARCHAR},</if>
|
| | | <if test="jumpDetail != null">fa_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if>
|
| | | <if test="params != null">fa_params=#{params,jdbcType=VARCHAR},</if>
|
| | | <if test="jumpNeedLogin != null">fa_jump_need_login=#{jumpNeedLogin,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="startTime != null">fa_start_time=#{startTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="endTime != null">fa_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="position != null">fa_position=#{position,jdbcType=VARCHAR},</if>
|
| | | <if test="order != null">fa_order=#{order,jdbcType=INTEGER},</if>
|
| | | <if test="type != null">fa_type=#{type,jdbcType=INTEGER},</if>
|
| | | <if test="state != null">fa_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">fa_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">fa_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="playSound !=null">fa_play_sound =#{playSound,jdbcType=BOOLEAN},</if>
|
| | | </set>
|
| | | where fa_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <delete id="deleteByPrimaryKeyList" parameterType="java.util.List">
|
| | | delete from yeshi_ec_float_ad WHERE fa_id in
|
| | | <foreach collection="list" item="item" open="(" separator=","
|
| | | close=")">#{item}</foreach>
|
| | | </delete>
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT
|
| | | <include refid="Base_Column_List" />
|
| | | FROM yeshi_ec_float_ad fd WHERE 1=1
|
| | | <if test="key != null and key !='' ">AND fd.`fa_name` LIKE '%${key}%'</if>
|
| | | <if test="state != null">AND fd.`fa_state` = #{state}</if>
|
| | | ORDER BY fd.`fa_position`,fd.`fa_order` LIMIT ${start},${count}
|
| | | </select>
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(COUNT(fd.`fa_id`),0) FROM yeshi_ec_float_ad fd WHERE 1=1
|
| | | <if test="key != null and key !='' ">AND fd.`fa_name` LIKE '%${key}%'</if>
|
| | | <if test="state != null">AND fd.`fa_state` = #{state}</if>
|
| | | </select>
|
| | | <select id="getMaxOrderByPosition" resultType="java.lang.Integer">SELECT
|
| | | IFNULL(MAX(fa_order),0) FROM yeshi_ec_float_ad WHERE fa_position =
|
| | | #{position}
|
| | | </select>
|
| | | <select id="getByAdjoinOrder" resultMap="BaseResultMap">
|
| | | SELECT
|
| | | <include refid="Base_Column_List" />
|
| | | FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position}
|
| | | <if test="type == -1">AND
|
| | | fd.`fa_order` <![CDATA[<]]>
|
| | | #{order} ORDER BY fd.`fa_order` desc
|
| | | </if>
|
| | | <if test="type == 1">AND
|
| | | fd.`fa_order` <![CDATA[>]]>
|
| | | #{order} ORDER BY fd.`fa_order`
|
| | | </if>
|
| | | LIMIT 1
|
| | | </select>
|
| | | <select id="countByPosition" resultType="java.lang.Integer">SELECT
|
| | | IFNULL(COUNT(fd.`fa_id`),0) FROM yeshi_ec_float_ad fd WHERE
|
| | | fd.`fa_position` = #{position}
|
| | | </select>
|
| | | <select id="ListByPrimaryKey" parameterType="java.util.List"
|
| | | resultMap="BaseResultMap">
|
| | | SELECT
|
| | | <include refid="Base_Column_List" />
|
| | | FROM yeshi_ec_float_ad WHERE fa_id in
|
| | | <foreach collection="list" item="item" open="(" separator=","
|
| | | close=")">#{item}</foreach>
|
| | | </select>
|
| | | <select id="getEffectiveFloatAD" resultMap="BaseResultMap">SELECT
|
| | | * FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} AND
|
| | | fd.`fa_state` = 1 AND IF(fd.`fa_start_time` IS
|
| | | NULL,TRUE,fd.`fa_start_time`<![CDATA[<=]]>
|
| | | NOW()) AND IF(fd.`fa_end_time` IS NULL,TRUE,fd.`fa_end_time` <![CDATA[>=]]>
|
| | | NOW())
|
| | | <if test="type != null">AND fa_type = #{type}</if>
|
| | | ORDER BY fd.`fa_order` LIMIT 1
|
| | | </select>
|
| | | <select id="getValidFloatAD" resultMap="BaseResultMap">SELECT
|
| | | * FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} AND
|
| | | fd.`fa_state` = 1 AND IF(fd.`fa_start_time` IS
|
| | | NULL,TRUE,fd.`fa_start_time`<![CDATA[<=]]>
|
| | | NOW()) AND IF(fd.`fa_end_time` IS NULL,TRUE,fd.`fa_end_time` <![CDATA[>=]]>
|
| | | NOW())
|
| | | <if test="type != null">AND fa_type = #{type}</if>
|
| | | ORDER BY fd.`fa_order`
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | select <include refid="Base_Column_List" /> from yeshi_ec_shop_goods_set
|
| | | where sgs_name like '${key}%'
|
| | | <if test="goodsId != null">AND sgs_goods_id = #{goodsId}</if>
|
| | | 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}%'
|
| | | where sgs_name like '${key}%' <if test="goodsId != null">AND sgs_goods_id = #{goodsId}</if>
|
| | | </select>
|
| | |
|
| | |
|
| | |
| | | <if test="payType != null">
|
| | | and sp_pay_type=#{payType}
|
| | | </if>
|
| | | <if test="setId != null">
|
| | | and sp_goods_set_id = #{setId}
|
| | | </if>
|
| | | order by sp_weight desc
|
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
| | | <if test="payType != null">
|
| | | and sp_pay_type=#{payType}
|
| | | </if>
|
| | | <if test="setId != null">
|
| | | and sp_goods_set_id = #{setId}
|
| | | </if>
|
| | | </select>
|
| | |
|
| | |
|
| | |
| | | <?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.BanLiShopOrderMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopOrder"> |
| | | <id column="so_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="so_uid" property="uid" jdbcType="BIGINT" /> |
| | | <result column="so_order_no" property="orderNo" jdbcType="VARCHAR" /> |
| | | <result column="so_payment_hongbao" property="hongBaoPayment" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="so_payment_hongbao_state" property="hongBaoPaymentState" |
| | | jdbcType="INTEGER" /> |
| | | <result column="so_payment_money" property="moneyPayment" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="so_payment_money_state" property="moneyPaymentState" |
| | | jdbcType="INTEGER" /> |
| | | <result column="so_payment_balance" property="balancePayment" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="so_payment_balance_state" property="balancePaymentState" |
| | | jdbcType="INTEGER" /> |
| | | <result column="so_pay_time" property="payTime" jdbcType="TIMESTAMP" /> |
| | | <result column="so_reject_time" property="rejectTime" jdbcType="TIMESTAMP" /> |
| | | <result column="so_success_time" property="successTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="so_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="so_state_desc" property="stateDesc" jdbcType="VARCHAR" /> |
| | | <result column="so_charge_account" property="chargeAccount" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="so_charge_account2" property="chargeAccount2" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="so_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | <result column="so_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="so_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="so_charge_account_type" property="chargeAccountType" |
| | | jdbcType="VARCHAR" /> |
| | | <association property="goods" column="so_goods_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods"> |
| | | <id column="so_goods_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | <association property="goodsSet" column="so_goods_set_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets"> |
| | | <id column="so_goods_set_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | <association property="orderGoods" column="so_order_goods_id" |
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods" |
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopOrderGoodsMapper.selectByPrimaryKey" /> |
| | | |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_order where so_id = #{0} for update |
| | | </select> |
| | | <select id="listByUidAndState" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_order where 1=1 |
| | | |
| | | <if test="uid!=null"> |
| | | and so_uid = #{uid} |
| | | </if> |
| | | |
| | | <if test="stateList!=null"> |
| | | <foreach collection="stateList" item="state" open=" and (" |
| | | close=")" separator=" or ">so_state=#{state}</foreach> |
| | | </if> |
| | | order by so_id desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="selectByOrderNo" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_shop_order where so_order_no = #{0} |
| | | </select> |
| | | |
| | | |
| | | <select id="countByUidAndState" resultType="java.lang.Long"> |
| | | select count(*) from yeshi_ec_shop_order where 1=1 |
| | | <if test="uid!=null"> |
| | | and so_uid = #{uid} |
| | | </if> |
| | | |
| | | <if test="stateList!=null"> |
| | | <foreach collection="stateList" item="state" open=" and (" |
| | | close=")" separator=" or ">so_state=#{state}</foreach> |
| | | </if> |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_order |
| | | (so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{hongBaoPayment,jdbcType=DECIMAL},#{hongBaoPaymentState,jdbcType=INTEGER},#{moneyPayment,jdbcType=DECIMAL},#{moneyPaymentState,jdbcType=INTEGER},#{balancePayment,jdbcType=DECIMAL},#{balancePaymentState,jdbcType=INTEGER},#{payTime,jdbcType=TIMESTAMP},#{rejectTime,jdbcType=TIMESTAMP},#{successTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR},#{chargeAccount,jdbcType=VARCHAR},#{chargeAccount2,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{orderGoods.id,jdbcType=BIGINT},#{chargeAccountType,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_shop_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">so_id,</if> |
| | | <if test="uid != null">so_uid,</if> |
| | | <if test="orderNo != null">so_order_no,</if> |
| | | <if test="goods != null">so_goods_id,</if> |
| | | <if test="goodsSet != null">so_goods_set_id,</if> |
| | | <if test="hongBaoPayment != null">so_payment_hongbao,</if> |
| | | <if test="hongBaoPaymentState != null">so_payment_hongbao_state,</if> |
| | | <if test="balancePayment != null"> so_payment_balance,</if> |
| | | <if test="balancePaymentState != null">so_payment_balance_state,</if> |
| | | <if test="moneyPayment != null">so_payment_money,</if> |
| | | <if test="moneyPaymentState != null">so_payment_money_state,</if> |
| | | <if test="payTime != null">so_pay_time,</if> |
| | | <if test="rejectTime != null">so_reject_time,</if> |
| | | <if test="successTime != null">so_success_time,</if> |
| | | <if test="state != null">so_state,</if> |
| | | <if test="stateDesc != null">so_state_desc,</if> |
| | | <if test="chargeAccount != null">so_charge_account,</if> |
| | | <if test="chargeAccount2 != null">so_charge_account2,</if> |
| | | <if test="beiZhu != null">so_beizhu,</if> |
| | | <if test="createTime != null">so_create_time,</if> |
| | | <if test="updateTime != null">so_update_time,</if> |
| | | <if test="orderGoods != null">so_order_goods_id,</if> |
| | | <if test="chargeAccountType != null">so_charge_account_type,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if> |
| | | <if test="goods != null">#{goods.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if> |
| | | <if test="hongBaoPayment != null">#{hongBaoPayment,jdbcType=DECIMAL},</if> |
| | | <if test="hongBaoPaymentState != null">#{hongBaoPaymentState,jdbcType=INTEGER},</if> |
| | | <if test="balancePayment != null">#{balancePayment,jdbcType=DECIMAL},</if> |
| | | <if test="balancePaymentState != null">#{balancePaymentState,jdbcType=INTEGER},</if> |
| | | <if test="moneyPayment != null">#{moneyPayment,jdbcType=DECIMAL},</if> |
| | | <if test="moneyPaymentState != null">#{moneyPaymentState,jdbcType=INTEGER},</if> |
| | | <if test="payTime != null">#{payTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="rejectTime != null">#{rejectTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="successTime != null">#{successTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if> |
| | | <if test="chargeAccount != null">#{chargeAccount,jdbcType=VARCHAR},</if> |
| | | <if test="chargeAccount2 != null">#{chargeAccount2,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderGoods != null">#{orderGoods.id,jdbcType=BIGINT},</if> |
| | | <if test="chargeAccountType != null">#{chargeAccountType,jdbcType=VARCHAR}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">update |
| | | yeshi_ec_shop_order set so_uid = #{uid,jdbcType=BIGINT},so_order_no = |
| | | #{orderNo,jdbcType=VARCHAR},so_goods_id = |
| | | #{goods.id,jdbcType=BIGINT},so_goods_set_id = |
| | | #{goodsSet.id,jdbcType=BIGINT},so_payment_hongbao = |
| | | #{hongBaoPayment,jdbcType=DECIMAL},so_payment_hongbao_state = |
| | | #{hongBaoPaymentState,jdbcType=INTEGER},so_payment_money = |
| | | #{moneyPayment,jdbcType=DECIMAL},so_payment_money_state = |
| | | #{moneyPaymentState,jdbcType=INTEGER},so_payment_balance = |
| | | #{balancePayment,jdbcType=DECIMAL},so_payment_balance_state = |
| | | #{balancePaymentState,jdbcType=INTEGER},so_pay_time = |
| | | #{payTime,jdbcType=TIMESTAMP},so_reject_time = |
| | | #{rejectTime,jdbcType=TIMESTAMP},so_success_time = |
| | | #{successTime,jdbcType=TIMESTAMP},so_state = |
| | | #{state,jdbcType=INTEGER},so_state_desc = |
| | | #{stateDesc,jdbcType=VARCHAR},so_charge_account = |
| | | #{chargeAccount,jdbcType=VARCHAR},so_charge_account2 = |
| | | #{chargeAccount2,jdbcType=VARCHAR},so_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR},so_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},so_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,so_order_goods_id |
| | | =#{orderGoods.id,jdbcType=BIGINT} ,so_charge_account_type |
| | | =#{chargeAccountType,jdbcType=VARCHAR} where so_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"> |
| | | update yeshi_ec_shop_order |
| | | <set> |
| | | <if test="uid != null">so_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="orderNo != null">so_order_no=#{orderNo,jdbcType=VARCHAR},</if> |
| | | <if test="goods != null">so_goods_id=#{goods.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsSet != null">so_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if> |
| | | <if test="hongBaoPayment != null">so_payment_hongbao=#{hongBaoPayment,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="hongBaoPaymentState != null">so_payment_hongbao_state=#{hongBaoPaymentState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="balancePayment != null">so_payment_balance=#{balancePayment,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="balancePaymentState != null">so_payment_balance_state=#{balancePaymentState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="moneyPayment != null">so_payment_money=#{moneyPayment,jdbcType=DECIMAL},</if> |
| | | <if test="moneyPaymentState != null">so_payment_money_state=#{moneyPaymentState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="payTime != null">so_pay_time=#{payTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="rejectTime != null">so_reject_time=#{rejectTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="successTime != null">so_success_time=#{successTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">so_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="stateDesc != null">so_state_desc=#{stateDesc,jdbcType=VARCHAR},</if> |
| | | <if test="chargeAccount != null">so_charge_account=#{chargeAccount,jdbcType=VARCHAR},</if> |
| | | <if test="chargeAccount2 != null">so_charge_account2=#{chargeAccount2,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="beiZhu != null">so_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">so_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">so_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderGoods !=null">so_order_goods_id =#{orderGoods.id,jdbcType=BIGINT},</if> |
| | | <if test="chargeAccountType !=null">so_charge_account_type |
| | | =#{chargeAccountType,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where so_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.BanLiShopOrderMapper">
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopOrder">
|
| | | <id column="so_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="so_uid" property="uid" jdbcType="BIGINT" />
|
| | | <result column="so_order_no" property="orderNo" jdbcType="VARCHAR" />
|
| | | <result column="so_payment_hongbao" property="hongBaoPayment"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="so_payment_hongbao_state" property="hongBaoPaymentState"
|
| | | jdbcType="INTEGER" />
|
| | | <result column="so_payment_money" property="moneyPayment"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="so_payment_money_state" property="moneyPaymentState"
|
| | | jdbcType="INTEGER" />
|
| | | <result column="so_payment_balance" property="balancePayment"
|
| | | jdbcType="DECIMAL" />
|
| | | <result column="so_payment_balance_state" property="balancePaymentState"
|
| | | jdbcType="INTEGER" />
|
| | | <result column="so_pay_time" property="payTime" jdbcType="TIMESTAMP" />
|
| | | <result column="so_reject_time" property="rejectTime" jdbcType="TIMESTAMP" />
|
| | | <result column="so_success_time" property="successTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="so_state" property="state" jdbcType="INTEGER" />
|
| | | <result column="so_state_desc" property="stateDesc" jdbcType="VARCHAR" />
|
| | | <result column="so_charge_account" property="chargeAccount"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="so_charge_account2" property="chargeAccount2"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="so_beizhu" property="beiZhu" jdbcType="VARCHAR" />
|
| | | <result column="so_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="so_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="so_charge_account_type" property="chargeAccountType"
|
| | | jdbcType="VARCHAR" />
|
| | | <association property="goods" column="so_goods_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
| | | <id column="so_goods_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | | <association property="goodsSet" column="so_goods_set_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
| | | <id column="so_goods_set_id" property="id" jdbcType="BIGINT" />
|
| | | </association>
|
| | | <association property="orderGoods" column="so_order_goods_id"
|
| | | javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods"
|
| | | select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopOrderGoodsMapper.selectByPrimaryKey" />
|
| | |
|
| | |
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_order where so_id = #{0} for update
|
| | | </select>
|
| | | <select id="listByUidAndState" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_order where 1=1
|
| | |
|
| | | <if test="uid!=null">
|
| | | and so_uid = #{uid}
|
| | | </if>
|
| | |
|
| | | <if test="stateList!=null">
|
| | | <foreach collection="stateList" item="state" open=" and ("
|
| | | close=")" separator=" or ">so_state=#{state}</foreach>
|
| | | </if>
|
| | | order by so_id desc limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="selectByOrderNo" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.String">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_shop_order where so_order_no = #{0}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="countByUidAndState" resultType="java.lang.Long">
|
| | | select count(*) from yeshi_ec_shop_order where 1=1
|
| | | <if test="uid!=null">
|
| | | and so_uid = #{uid}
|
| | | </if>
|
| | |
|
| | | <if test="stateList!=null">
|
| | | <foreach collection="stateList" item="state" open=" and ("
|
| | | close=")" separator=" or ">so_state=#{state}</foreach>
|
| | | </if>
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_order
|
| | | (so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{hongBaoPayment,jdbcType=DECIMAL},#{hongBaoPaymentState,jdbcType=INTEGER},#{moneyPayment,jdbcType=DECIMAL},#{moneyPaymentState,jdbcType=INTEGER},#{balancePayment,jdbcType=DECIMAL},#{balancePaymentState,jdbcType=INTEGER},#{payTime,jdbcType=TIMESTAMP},#{rejectTime,jdbcType=TIMESTAMP},#{successTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR},#{chargeAccount,jdbcType=VARCHAR},#{chargeAccount2,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{orderGoods.id,jdbcType=BIGINT},#{chargeAccountType,jdbcType=VARCHAR})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_shop_order
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">so_id,</if>
|
| | | <if test="uid != null">so_uid,</if>
|
| | | <if test="orderNo != null">so_order_no,</if>
|
| | | <if test="goods != null">so_goods_id,</if>
|
| | | <if test="goodsSet != null">so_goods_set_id,</if>
|
| | | <if test="hongBaoPayment != null">so_payment_hongbao,</if>
|
| | | <if test="hongBaoPaymentState != null">so_payment_hongbao_state,</if>
|
| | | <if test="balancePayment != null"> so_payment_balance,</if>
|
| | | <if test="balancePaymentState != null">so_payment_balance_state,</if>
|
| | | <if test="moneyPayment != null">so_payment_money,</if>
|
| | | <if test="moneyPaymentState != null">so_payment_money_state,</if>
|
| | | <if test="payTime != null">so_pay_time,</if>
|
| | | <if test="rejectTime != null">so_reject_time,</if>
|
| | | <if test="successTime != null">so_success_time,</if>
|
| | | <if test="state != null">so_state,</if>
|
| | | <if test="stateDesc != null">so_state_desc,</if>
|
| | | <if test="chargeAccount != null">so_charge_account,</if>
|
| | | <if test="chargeAccount2 != null">so_charge_account2,</if>
|
| | | <if test="beiZhu != null">so_beizhu,</if>
|
| | | <if test="createTime != null">so_create_time,</if>
|
| | | <if test="updateTime != null">so_update_time,</if>
|
| | | <if test="orderGoods != null">so_order_goods_id,</if>
|
| | | <if test="chargeAccountType != null">so_charge_account_type,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
|
| | | <if test="goods != null">#{goods.id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if>
|
| | | <if test="hongBaoPayment != null">#{hongBaoPayment,jdbcType=DECIMAL},</if>
|
| | | <if test="hongBaoPaymentState != null">#{hongBaoPaymentState,jdbcType=INTEGER},</if>
|
| | | <if test="balancePayment != null">#{balancePayment,jdbcType=DECIMAL},</if>
|
| | | <if test="balancePaymentState != null">#{balancePaymentState,jdbcType=INTEGER},</if>
|
| | | <if test="moneyPayment != null">#{moneyPayment,jdbcType=DECIMAL},</if>
|
| | | <if test="moneyPaymentState != null">#{moneyPaymentState,jdbcType=INTEGER},</if>
|
| | | <if test="payTime != null">#{payTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="rejectTime != null">#{rejectTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="successTime != null">#{successTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if>
|
| | | <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeAccount != null">#{chargeAccount,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeAccount2 != null">#{chargeAccount2,jdbcType=VARCHAR},</if>
|
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="orderGoods != null">#{orderGoods.id,jdbcType=BIGINT},</if>
|
| | | <if test="chargeAccountType != null">#{chargeAccountType,jdbcType=VARCHAR}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">update
|
| | | yeshi_ec_shop_order set so_uid = #{uid,jdbcType=BIGINT},so_order_no =
|
| | | #{orderNo,jdbcType=VARCHAR},so_goods_id =
|
| | | #{goods.id,jdbcType=BIGINT},so_goods_set_id =
|
| | | #{goodsSet.id,jdbcType=BIGINT},so_payment_hongbao =
|
| | | #{hongBaoPayment,jdbcType=DECIMAL},so_payment_hongbao_state =
|
| | | #{hongBaoPaymentState,jdbcType=INTEGER},so_payment_money =
|
| | | #{moneyPayment,jdbcType=DECIMAL},so_payment_money_state =
|
| | | #{moneyPaymentState,jdbcType=INTEGER},so_payment_balance =
|
| | | #{balancePayment,jdbcType=DECIMAL},so_payment_balance_state =
|
| | | #{balancePaymentState,jdbcType=INTEGER},so_pay_time =
|
| | | #{payTime,jdbcType=TIMESTAMP},so_reject_time =
|
| | | #{rejectTime,jdbcType=TIMESTAMP},so_success_time =
|
| | | #{successTime,jdbcType=TIMESTAMP},so_state =
|
| | | #{state,jdbcType=INTEGER},so_state_desc =
|
| | | #{stateDesc,jdbcType=VARCHAR},so_charge_account =
|
| | | #{chargeAccount,jdbcType=VARCHAR},so_charge_account2 =
|
| | | #{chargeAccount2,jdbcType=VARCHAR},so_beizhu =
|
| | | #{beiZhu,jdbcType=VARCHAR},so_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},so_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} ,so_order_goods_id
|
| | | =#{orderGoods.id,jdbcType=BIGINT} ,so_charge_account_type
|
| | | =#{chargeAccountType,jdbcType=VARCHAR} where so_id =
|
| | | #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">
|
| | | update yeshi_ec_shop_order
|
| | | <set>
|
| | | <if test="uid != null">so_uid=#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="orderNo != null">so_order_no=#{orderNo,jdbcType=VARCHAR},</if>
|
| | | <if test="goods != null">so_goods_id=#{goods.id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsSet != null">so_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if>
|
| | | <if test="hongBaoPayment != null">so_payment_hongbao=#{hongBaoPayment,jdbcType=DECIMAL},
|
| | | </if>
|
| | | <if test="hongBaoPaymentState != null">so_payment_hongbao_state=#{hongBaoPaymentState,jdbcType=INTEGER},
|
| | | </if>
|
| | | <if test="balancePayment != null">so_payment_balance=#{balancePayment,jdbcType=DECIMAL},
|
| | | </if>
|
| | | <if test="balancePaymentState != null">so_payment_balance_state=#{balancePaymentState,jdbcType=INTEGER},
|
| | | </if>
|
| | | <if test="moneyPayment != null">so_payment_money=#{moneyPayment,jdbcType=DECIMAL},</if>
|
| | | <if test="moneyPaymentState != null">so_payment_money_state=#{moneyPaymentState,jdbcType=INTEGER},
|
| | | </if>
|
| | | <if test="payTime != null">so_pay_time=#{payTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="rejectTime != null">so_reject_time=#{rejectTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="successTime != null">so_success_time=#{successTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="state != null">so_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="stateDesc != null">so_state_desc=#{stateDesc,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeAccount != null">so_charge_account=#{chargeAccount,jdbcType=VARCHAR},</if>
|
| | | <if test="chargeAccount2 != null">so_charge_account2=#{chargeAccount2,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="beiZhu != null">so_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">so_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">so_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="orderGoods !=null">so_order_goods_id =#{orderGoods.id,jdbcType=BIGINT},</if>
|
| | | <if test="chargeAccountType !=null">so_charge_account_type
|
| | | =#{chargeAccountType,jdbcType=VARCHAR},
|
| | | </if>
|
| | | </set>
|
| | | where so_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | |
|
| | | BrandShopCahe brandShop = new BrandShopCahe();
|
| | | brandShop.setBrandId(brandInfo.getId());
|
| | | brandShop.setShop(ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop));
|
| | | brandShop.setShop(shopInfoVO);
|
| | | brandShop.setCreateTime(new Date());
|
| | | brandShopCaheDao.insert(brandShop);
|
| | | return false;
|
| | |
| | | package com.yeshi.fanli.service.impl.money;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | import com.yeshi.fanli.dao.mybatis.user.UserMoneyExtraMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyExtraService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | |
|
| | | @Service
|
| | | public class UserMoneyExtraServiceImpl implements UserMoneyExtraService {
|
| | |
| | | userMoneyExtraMapper.updateByPrimaryKeySelective(record);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public void listValid(int page, int count) {
|
| | | userMoneyExtraMapper.listValid((page-1) * count, count);
|
| | | public List<UserMoneyExtra> listValid(int page, int count) {
|
| | | return userMoneyExtraMapper.listValid((page-1) * count, count);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.exception.msg.MsgMoneyDetailException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.money.msg.MsgMoneyDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | |
| | | System.out.println("1-insertSelective执行数据。。。。。。。。。。" + detail.getId());
|
| | | LogHelper.test("1-insertSelective执行数据。。。。。。。。。。" + detail.getId());
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) {
|
| | | if (detail.getMoney() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | |
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | }
|
| | |
|
| | | userMsgReadStateService.addMoneyMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | System.out.println("1-insertSelective执行数据完成。。。。。。。。。。");
|
| | | LogHelper.test("2-insertSelective执行数据。。。。。。。。。。" + detail.getId());
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackBalance;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackExchange;
|
| | |
| | | throw new RedPackExchangeException(1, "参数不正确");
|
| | |
|
| | | String extractBanlenMin = redPackConfigService.getValueByKey("extract_banlen_min");
|
| | | |
| | | BigDecimal balance = redPackBalanceService.getBalance(uid);
|
| | | if (balance == null || balance.compareTo(new BigDecimal(extractBanlenMin)) < 0)
|
| | | |
| | | RedPackBalance balance = redPackBalanceService.selectByPrimaryKey(uid);
|
| | | if (balance == null)
|
| | | throw new RedPackExchangeException(1, "余额不足" + extractBanlenMin + "元");
|
| | |
|
| | | if (balance.compareTo(amount) < 0)
|
| | | if (balance.getState() != null && balance.getState() == RedPackBalance.STATE_LOCKED) |
| | | throw new RedPackExchangeException(1, "红包已封禁,感谢使用");
|
| | | |
| | | BigDecimal balanceMoney = balance.getMoney();
|
| | | if (balanceMoney == null || balanceMoney.compareTo(new BigDecimal(extractBanlenMin)) < 0)
|
| | | throw new RedPackExchangeException(1, "余额不足" + extractBanlenMin + "元");
|
| | | |
| | | if (balanceMoney.compareTo(amount) < 0)
|
| | | throw new RedPackExchangeException(1, "提现余额不足");
|
| | |
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.TokenRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.TokenRecord.TokenTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackBalance;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackGiveRecord;
|
| | |
| | | if (amount.compareTo(new BigDecimal(giveMin)) < 0 || amount.compareTo(new BigDecimal(giveMax)) > 0)
|
| | | throw new RedPackGiveRecordException(1, "赠送金额至少" + giveMin + "元至多" + giveMax + "元");
|
| | |
|
| | | BigDecimal balance = redPackBalanceService.getBalance(uid);
|
| | | if (balance == null || amount.compareTo(balance) > 0)
|
| | | RedPackBalance balance = redPackBalanceService.selectByPrimaryKey(uid);
|
| | | if (balance == null)
|
| | | throw new RedPackGiveRecordException(1, "余额不足");
|
| | | |
| | | if (balance.getState() != null && balance.getState() == RedPackBalance.STATE_LOCKED) |
| | | throw new RedPackGiveRecordException(1, "红包已封禁,感谢使用");
|
| | | |
| | | if (balance.getMoney() == null || amount.compareTo(balance.getMoney()) > 0)
|
| | | throw new RedPackGiveRecordException(1, "余额不足");
|
| | | |
| | |
|
| | | Date nowDate = new Date();
|
| | | // 赠送记录
|
| | |
| | | package com.yeshi.fanli.service.impl.shop;
|
| | |
|
| | | import java.io.InputStream;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.shop.BanLiShopGoodsMapper;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoods;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void saveObject(MultipartFile file, MultipartFile file2, BanLiShopGoods record) throws BanLiShopGoodsException, Exception{
|
| | | if (record.getGoodsClass() == null || record.getGoodsClass().getId() == null)
|
| | | throw new BanLiShopGoodsException(1, "请指定商品分类");
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(record.getTitle()))
|
| | | throw new BanLiShopGoodsException(1, "缺少标题");
|
| | |
|
| | | if (file != null)
|
| | | record.setPicture(uploadPicture(file));
|
| | | |
| | | if (file2 != null)
|
| | | record.setSquarePicture(uploadPicture(file2));
|
| | | |
| | | if (record.getState() == null)
|
| | | record.setState(BanLiShopGoods.STATE_ONLINE);
|
| | | |
| | | if (record.getSalesCount() == null)
|
| | | record.setSalesCount(0L);
|
| | | |
| | | record.setUpdateTime(new Date());
|
| | | |
| | | if (record.getId() == null) {
|
| | | if (StringUtil.isNullOrEmpty(record.getPicture()))
|
| | | throw new BanLiShopGoodsException(1, "缺少封面图");
|
| | | |
| | | record.setCreateTime(new Date());
|
| | | banLiShopGoodsMapper.insertSelective(record);
|
| | | } else {
|
| | | BanLiShopGoods resultObj = banLiShopGoodsMapper.selectDetailByPrimaryKey(record.getId());
|
| | | if (resultObj == null)
|
| | | throw new BanLiShopGoodsException(1, "修改内容已不存在");
|
| | | |
| | | if (StringUtil.isNullOrEmpty(record.getPicture())) {
|
| | | record.setPicture(resultObj.getPicture());
|
| | | } else {
|
| | | removePicture(resultObj.getPicture());
|
| | | }
|
| | | |
| | | if (StringUtil.isNullOrEmpty(record.getSquarePicture())) {
|
| | | record.setSquarePicture(resultObj.getSquarePicture());
|
| | | } else {
|
| | | removePicture(resultObj.getSquarePicture());
|
| | | }
|
| | | |
| | | if (StringUtil.isNullOrEmpty(record.getPicture()))
|
| | | throw new BanLiShopGoodsException(1, "缺少封面图");
|
| | | |
| | | record.setCreateTime(resultObj.getCreateTime());
|
| | | banLiShopGoodsMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 上传图片
|
| | | * @param file
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public String uploadPicture(MultipartFile file) throws Exception {
|
| | | // 文件解析 |
| | | InputStream inputStream = file.getInputStream();
|
| | | String contentType = file.getContentType();
|
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | | // 文件路径
|
| | | String filePath="/img/BanLiShopGoods/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | String fileLink= COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | | return fileLink;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除图片-不更新数据库
|
| | | * @param record
|
| | | * @throws Exception
|
| | | */
|
| | | public void removePicture(String picture) throws Exception {
|
| | | if (picture != null && picture.trim().length() > 0) {
|
| | | COSManager.getInstance().deleteFile(picture);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | | @Override
|
| | | public void updateSelectiveByPrimaryKey(BanLiShopGoods goods) {
|
| | | if (goods == null || goods.getId() == null)
|
| | |
| | | updateSelectiveByPrimaryKey(pay);
|
| | | }
|
| | | }
|
| | | |
| | | @Override
|
| | | public void saveObject(BanLiShopGoodsSetsPay record) throws BanLiShopGoodsSetPayException {
|
| | | // 判断参数是否齐全
|
| | | if (record.getGoodsSet() == null || record.getGoodsSet().getId() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "套餐不存在");
|
| | |
|
| | | if (record.getPayType() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "请指定支付方式");
|
| | |
|
| | | if (record.getPayType() == BanLiShopGoodsSetsPay.PAY_TYPE_HONGBAO) {
|
| | | if (record.getHongBaoPrice() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "请指定红包支付价格");
|
| | | } else if (record.getPayType() == BanLiShopGoodsSetsPay.PAY_TYPE_BALANCE) {
|
| | | if (record.getBalancePrice() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "请指定余额支付价格");
|
| | | } else if (record.getPayType() == BanLiShopGoodsSetsPay.PAY_TYPE_HONGBAO_MONEY) {
|
| | | if (record.getHongBaoPrice() == null || record.getMoneyPrice() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "请指定红包、现金支付价格");
|
| | | } else if (record.getPayType() == BanLiShopGoodsSetsPay.PAY_TYPE_MONEY) {
|
| | | if (record.getMoneyPrice() == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "请指定现金支付价格");
|
| | | }
|
| | |
|
| | | record.setUpdateTime(new Date());
|
| | | if (record.getId() == null) {
|
| | | record.setCreateTime(new Date());
|
| | | banLiShopGoodsSetsPayMapper.insertSelective(record);
|
| | |
|
| | | if (record.getWeight() == null) {// 权重更新
|
| | | BanLiShopGoodsSetsPay update = new BanLiShopGoodsSetsPay();
|
| | | update.setId(record.getId());
|
| | | update.setWeight((int) record.getId().longValue());
|
| | | banLiShopGoodsSetsPayMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | } else {
|
| | | BanLiShopGoodsSetsPay resultObj = banLiShopGoodsSetsPayMapper.selectByPrimaryKey(record.getId());
|
| | | if (resultObj == null)
|
| | | throw new BanLiShopGoodsSetPayException(1, "修改内容已不存在");
|
| | | |
| | | record.setCreateTime(resultObj.getCreateTime());
|
| | | banLiShopGoodsSetsPayMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void updateSelectiveByPrimaryKey(BanLiShopGoodsSetsPay pay) {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType) {
|
| | | return banLiShopGoodsSetsPayMapper.listQuery((page - 1) * pageSize, pageSize, key, payType);
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType, Long setId) {
|
| | | return banLiShopGoodsSetsPayMapper.listQuery((page - 1) * pageSize, pageSize, key, payType, setId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer payType) {
|
| | | return banLiShopGoodsSetsPayMapper.countQuery(key, payType);
|
| | | public long countQuery(String key, Integer payType, Long setId) {
|
| | | return banLiShopGoodsSetsPayMapper.countQuery(key, payType, setId);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void saveObject(BanLiShopGoodsSets record) throws BanLiShopGoodsSetException {
|
| | | if (record.getGoods() == null || record.getGoods().getId() == null)
|
| | | throw new BanLiShopGoodsSetException(1, "请指定商品");
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(record.getName()))
|
| | | throw new BanLiShopGoodsSetException(1, "缺少套餐名字");
|
| | |
|
| | | if (record.getOriginalPrice() == null || record.getZkPrice() == null)
|
| | | throw new BanLiShopGoodsSetException(1, "价格信息不完整");
|
| | |
|
| | | if (record.getStock() == null)
|
| | | throw new BanLiShopGoodsSetException(1, "缺少库存信息");
|
| | |
|
| | | record.setUpdateTime(new Date());
|
| | | if (record.getId() == null) {
|
| | | record.setCreateTime(new Date());
|
| | | banLiShopGoodsSetsMapper.insertSelective(record);
|
| | | |
| | | if (record.getWeight() == null) {// 权重更新
|
| | | BanLiShopGoodsSets update = new BanLiShopGoodsSets();
|
| | | update.setId(record.getId());
|
| | | update.setWeight((int) record.getId().longValue());
|
| | | banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | } else {
|
| | | BanLiShopGoodsSets resultObj = banLiShopGoodsSetsMapper.selectDetailByPrimaryKey(record.getId());
|
| | | if (resultObj == null)
|
| | | throw new BanLiShopGoodsSetException(1, "修改内容已不存在");
|
| | | |
| | | record.setCreateTime(resultObj.getCreateTime());
|
| | | banLiShopGoodsSetsMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | @Override
|
| | | public void updateSelectiveByPrimaryKey(BanLiShopGoodsSets set) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key) {
|
| | | return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key);
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key, Long goodsId) {
|
| | | return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key, goodsId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | return banLiShopGoodsSetsMapper.countQuery(key);
|
| | | public long countQuery(String key, Long goodsId) {
|
| | | return banLiShopGoodsSetsMapper.countQuery(key, goodsId);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | MsgOtherRewardIntegralDTO msgOther = new MsgOtherRewardIntegralDTO();
|
| | | msgOther.setTitle("推广红包");
|
| | | msgOther.setTotal("推广红包¥" + tlj.setScale(2));
|
| | | msgOther.setNum(goldCoin + "枚");
|
| | | msgOther.setNum(addGoldCoin + "枚");
|
| | | msgOther.setSource("已进入到可用金币中");
|
| | | msgOther.setExplain("原推广红包功能下线,剩余推广红包按照10:1折算为金币 ");
|
| | | userOtherMsgNotificationService.taoLiJinExchangeMsg(uid, "本折算有且仅有一次", msgOther);
|
| | |
| | | package com.yeshi.fanli.service.inter.money;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | |
|
| | | public interface UserMoneyExtraService {
|
| | |
| | | public void updateByPrimaryKeySelective(UserMoneyExtra record);
|
| | |
|
| | |
|
| | | public void listValid(int page, int count);
|
| | | /**
|
| | | * 获取有效金币用户
|
| | | * @param page
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<UserMoneyExtra> listValid(int page, int count);
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoods;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsException;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetException;
|
| | |
| | | * @param count
|
| | | */
|
| | | public void addSalesCount(Long id,int count);
|
| | |
|
| | | /**
|
| | | * 后台维护
|
| | | * @param file
|
| | | * @param file2
|
| | | * @param record
|
| | | * @throws BanLiShopGoodsSetException
|
| | | * @throws Exception
|
| | | */
|
| | | public void saveObject(MultipartFile file, MultipartFile file2, BanLiShopGoods record)
|
| | | throws BanLiShopGoodsException, Exception;
|
| | |
|
| | |
|
| | | }
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetException;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetPayException;
|
| | |
|
| | | /**
|
| | |
| | | * @param payType
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType);
|
| | | public List<BanLiShopGoodsSetsPay> listQuery(int page, int pageSize, String key, Integer payType, Long setId);
|
| | |
|
| | | public long countQuery(String key, Integer payType);
|
| | | public long countQuery(String key, Integer payType, Long setId);
|
| | |
|
| | | /**
|
| | | * 后台编辑
|
| | | * @param record
|
| | | * @throws BanLiShopGoodsSetException
|
| | | */
|
| | | public void saveObject(BanLiShopGoodsSetsPay record) throws BanLiShopGoodsSetPayException;
|
| | |
|
| | | }
|
| | |
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key);
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key, Long goodsId);
|
| | |
|
| | | public long countQuery(String key);
|
| | | public long countQuery(String key, Long goodsId);
|
| | |
|
| | | /**
|
| | | * 销量增加
|
| | |
| | | */
|
| | | public void addSalesCount(Long id,int count);
|
| | |
|
| | | /**
|
| | | * 后台编辑
|
| | | * @param record
|
| | | * @throws BanLiShopGoodsSetException
|
| | | */
|
| | | public void saveObject(BanLiShopGoodsSets record) throws BanLiShopGoodsSetException;
|
| | |
|
| | | }
|
| | |
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) {
|
| | | if (StringUtil.isNullOrEmpty(msg.getContent()))
|
| | | return null;
|
| | |
|
| | | MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
|
| | | if (dto == null)
|
| | | return null;
|
| | |
|
| | | icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png";
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (dto.getTotal() != null) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getTotal(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("可则算额", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getNum())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("折算金币", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getSource())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getSource(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
|
| | |
|
| | | UserMsgVO userMsgVO = new UserMsgVO();
|
| | | userMsgVO.setIcon(icon);
|
| | | userMsgVO.setTitle(dto.getTitle());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | |
|
| | | return new UserMsgVO(icon, msg.getType().getDesc(),
|