yujian
2019-11-07 d32f3a1e73dfc21588c62ed6ef6ec331760f9b94
商城后台审核
10个文件已修改
96 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetAdminController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/shop/BanLiShopGoodsSetsMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/shop/BanLiShopGoodsSetsPayMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/shop/BanLiShopGoodsSetsMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/shop/BanLiShopGoodsSetsPayMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetPayServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetPayService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetAdminController.java
@@ -5,6 +5,7 @@
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;
@@ -14,6 +15,8 @@
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.exception.shop.BanLiShopGoodsSetPayException;
import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
@@ -28,6 +31,28 @@
    @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.addSet(record);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
        } 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("操作异常"));
        }
    }
    
     /** 
     * 删除
@@ -68,7 +93,7 @@
     * @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;
@@ -76,13 +101,13 @@
            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);
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java
@@ -5,6 +5,7 @@
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;
@@ -14,6 +15,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
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.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
@@ -27,6 +29,20 @@
    
    @Resource
    private BanLiShopGoodsSetPayService banLiShopGoodsSetPayService;
    @RequestMapping(value = "save")
    public void save(String callback, BanLiShopGoodsSetsPay record, HttpServletRequest request, PrintWriter out) {
        try {
            banLiShopGoodsSetPayService.addSetPay(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("操作异常"));
        }
    }
    
    
     /** 
@@ -68,7 +84,7 @@
     * @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;
@@ -76,13 +92,13 @@
            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);
            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);
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/shop/BanLiShopGoodsSetsMapper.java
@@ -27,7 +27,8 @@
     * @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);
    /**
     * 计数
@@ -36,5 +37,5 @@
     * @param state
     * @return
     */
    long countQuery(@Param("key") String key);
    long countQuery(@Param("key") String key, @Param("goodsId")Long goodsId);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/shop/BanLiShopGoodsSetsPayMapper.java
@@ -33,7 +33,8 @@
     * @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);
    /**
     * 计数
@@ -42,6 +43,6 @@
     * @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);
}
fanli/src/main/java/com/yeshi/fanli/mapping/shop/BanLiShopGoodsSetsMapper.xml
@@ -88,13 +88,14 @@
    <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>
    
    
fanli/src/main/java/com/yeshi/fanli/mapping/shop/BanLiShopGoodsSetsPayMapper.xml
@@ -49,6 +49,9 @@
        <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>
@@ -59,6 +62,9 @@
        <if test="payType != null">
            and sp_pay_type=#{payType}
        </if>
        <if test="setId != null">
            and sp_goods_set_id = #{setId}
        </if>
    </select>
    
    
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetPayServiceImpl.java
@@ -99,13 +99,13 @@
    
    @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);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java
@@ -129,13 +129,13 @@
    
    
    @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);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetPayService.java
@@ -73,8 +73,8 @@
     * @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);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetService.java
@@ -73,8 +73,8 @@
     * @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);
}