il y a 8 mois
Parent
commit
835a8ca112
20 fichiers modifiés avec 595 ajouts et 140 suppressions
  1. 7 7
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/ipInfo/controller/IpInfoController.java
  2. 115 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/controller/ProdController.java
  3. 29 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/domain/ProdVo.java
  4. 40 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/mapper/ProdVoMapper.java
  5. 30 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/IProdVoService.java
  6. 26 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdCommonService.java
  7. 44 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdServiceVoImpl.java
  8. 55 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdVoMapper.xml
  9. 18 1
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/add.html
  10. 17 1
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/edit.html
  11. 26 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/add.html
  12. 26 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/edit.html
  13. 5 2
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/ipInfo.html
  14. 83 87
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/product/prod/prod.html
  15. 37 15
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/constant/UserConstants.java
  16. 8 8
      08.src/Xingxi/xingxi-framework/src/main/java/com/xingxi/framework/web/service/DictService.java
  17. 23 17
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/master/ipInfo/service/impl/IpInfoServiceImpl.java
  18. 2 1
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/IpInfoMapper.xml
  19. 2 1
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/ProdClassMapper.xml
  20. 2 0
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/ProdPicMapper.xml

+ 7 - 7
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/ipInfo/controller/IpInfoController.java

@@ -28,7 +28,7 @@ public class IpInfoController extends BaseController {
     private final String prefix = "master/ipInfo";
 
     @Resource
-    private IIpInfoService ipInfoService;
+    private IIpInfoService IIpInfoService;
 
     @RequiresPermissions("system:ipInfo:view")
     @GetMapping()
@@ -44,7 +44,7 @@ public class IpInfoController extends BaseController {
     @ResponseBody
     public TableDataInfo list(IpInfo ipInfo) {
         startPage();
-        List<IpInfo> list = ipInfoService.selectIpInfoList(ipInfo);
+        List<IpInfo> list = IIpInfoService.selectIpInfoList(ipInfo);
         return getDataTable(list);
     }
 
@@ -56,7 +56,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/export")
     @ResponseBody
     public AjaxResult export(IpInfo ipInfo) {
-        List<IpInfo> list = ipInfoService.selectIpInfoList(ipInfo);
+        List<IpInfo> list = IIpInfoService.selectIpInfoList(ipInfo);
         ExcelUtil<IpInfo> util = new ExcelUtil<>(IpInfo.class);
         return util.exportExcel(list, "文创品牌数据");
     }
@@ -77,7 +77,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/add")
     @ResponseBody
     public AjaxResult addSave(IpInfo ipInfo) {
-        return toAjax(ipInfoService.insertIpInfo(ipInfo));
+        return toAjax(IIpInfoService.insertIpInfo(ipInfo));
     }
 
     /**
@@ -86,7 +86,7 @@ public class IpInfoController extends BaseController {
     @RequiresPermissions("system:ipInfo:edit")
     @GetMapping("/edit/{ipInfoId}")
     public String edit(@PathVariable("ipInfoId") Long ipInfoId, ModelMap mMap) {
-        IpInfo ipInfo = ipInfoService.selectIpInfoByIpId(ipInfoId);
+        IpInfo ipInfo = IIpInfoService.selectIpInfoByIpId(ipInfoId);
         mMap.put("ipInfo", ipInfo);
         return prefix + "/edit";
     }
@@ -99,7 +99,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/edit")
     @ResponseBody
     public AjaxResult editSave(IpInfo ipInfo) {
-        return toAjax(ipInfoService.updateIpInfo(ipInfo));
+        return toAjax(IIpInfoService.updateIpInfo(ipInfo));
     }
 
     /**
@@ -110,6 +110,6 @@ public class IpInfoController extends BaseController {
     @PostMapping("/remove")
     @ResponseBody
     public AjaxResult remove(String ids) {
-        return toAjax(ipInfoService.deleteIpInfoByIpIds(ids));
+        return toAjax(IIpInfoService.deleteIpInfoByIpIds(ids));
     }
 }

+ 115 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/controller/ProdController.java

@@ -0,0 +1,115 @@
+package com.xingxi.web.controller.master.product.controller;
+
+import com.xingxi.common.annotation.Log;
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.domain.AjaxResult;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.enums.BusinessType;
+import com.xingxi.common.utils.poi.ExcelUtil;
+import com.xingxi.master.product.domain.Prod;
+import com.xingxi.web.controller.master.product.service.IProdVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 商品Controller
+ *
+ * @author ruoyi
+ * @date 2025-03-09
+ */
+@Controller
+@RequestMapping("/master/product/prod")
+public class ProdController extends BaseController {
+    private final String prefix = "master/product/prod";
+
+    @Resource
+    private IProdVoService prodVoService;
+
+    @RequiresPermissions("master:product:view")
+    @GetMapping()
+    public String prod() {
+        return prefix + "/prod";
+    }
+
+    /**
+     * 查询商品列表
+     */
+    @RequiresPermissions("master:product:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(Prod prod) {
+        startPage();
+        List<Prod> list = prodVoService.selectProdList(prod);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品列表
+     */
+    @RequiresPermissions("master:product:export")
+    @Log(title = "商品", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(Prod prod) {
+        List<Prod> list = prodVoService.selectProdList(prod);
+        ExcelUtil<Prod> util = new ExcelUtil<>(Prod.class);
+        return util.exportExcel(list, "商品数据");
+    }
+
+    /**
+     * 新增商品
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存商品
+     */
+    @RequiresPermissions("master:product:add")
+    @Log(title = "商品", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(Prod prod) {
+        return toAjax(prodVoService.insertProd(prod));
+    }
+
+    /**
+     * 修改商品
+     */
+    @RequiresPermissions("master:product:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mMap) {
+        Prod prod = prodVoService.selectProdById(id);
+        mMap.put("prod", prod);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存商品
+     */
+    @RequiresPermissions("master:product:edit")
+    @Log(title = "商品", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(Prod prod) {
+        return toAjax(prodVoService.updateProd(prod));
+    }
+
+    /**
+     * 删除商品
+     */
+    @RequiresPermissions("master:product:remove")
+    @Log(title = "商品", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(prodVoService.deleteProdByIds(ids));
+    }
+}

+ 29 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/domain/ProdVo.java

@@ -0,0 +1,29 @@
+package com.xingxi.web.controller.master.product.domain;
+
+import com.xingxi.master.product.domain.Prod;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * 商品对象 m_prod
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class ProdVo extends Prod {
+    private static final long serialVersionUID = 1L;
+
+    private String prodClass;
+
+    private String prodName;
+
+    private String ipName;
+
+    private String designerName;
+
+    private String prodDesc;
+}

+ 40 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/mapper/ProdVoMapper.java

@@ -0,0 +1,40 @@
+package com.xingxi.web.controller.master.product.mapper;
+
+import com.xingxi.master.product.domain.ProdClass;
+import com.xingxi.master.product.mapper.ProdMapper;
+import com.xingxi.web.controller.master.product.domain.ProdVo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 商品Mapper接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Repository
+public interface ProdVoMapper extends ProdMapper {
+    /**
+     * 查询商品
+     *
+     * @param id 商品主键
+     * @return 商品
+     */
+    ProdVo selectProdVoById(Long id);
+
+    /**
+     * 查询商品列表
+     *
+     * @param prodVo 商品
+     * @return 商品集合
+     */
+    List<ProdVo> selectProdVoList(ProdVo prodVo);
+
+    /**
+     * 查询商品分类列表
+     *
+     * @return 商品分类列表
+     */
+    List<ProdClass> selectProdClassList();
+}

+ 30 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/IProdVoService.java

@@ -0,0 +1,30 @@
+package com.xingxi.web.controller.master.product.service;
+
+import com.xingxi.master.product.service.IProdService;
+import com.xingxi.web.controller.master.product.domain.ProdVo;
+
+import java.util.List;
+
+/**
+ * 商品Service接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface IProdVoService extends IProdService {
+    /**
+     * 查询商品
+     *
+     * @param id 商品主键
+     * @return 商品
+     */
+    ProdVo selectProdVoById(Long id);
+
+    /**
+     * 查询商品列表
+     *
+     * @param prodVo 商品Vo
+     * @return 商品集合
+     */
+    List<ProdVo> selectProdVoList(ProdVo prodVo);
+}

+ 26 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdCommonService.java

@@ -0,0 +1,26 @@
+package com.xingxi.web.controller.master.product.service.impl;
+
+import com.xingxi.master.product.domain.ProdClass;
+import com.xingxi.web.controller.master.product.mapper.ProdVoMapper;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 商品共通Service
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Component("product")
+public class ProdCommonService {
+    private final ProdVoMapper prodVoMapper;
+
+    public ProdCommonService(ProdVoMapper prodVoMapper) {
+        this.prodVoMapper = prodVoMapper;
+    }
+
+    public List<ProdClass> getProdClasses(){
+        return prodVoMapper.selectProdClassList();
+    }
+}

+ 44 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdServiceVoImpl.java

@@ -0,0 +1,44 @@
+package com.xingxi.web.controller.master.product.service.impl;
+
+import com.xingxi.master.product.service.impl.ProdServiceImpl;
+import com.xingxi.web.controller.master.product.domain.ProdVo;
+import com.xingxi.web.controller.master.product.mapper.ProdVoMapper;
+import com.xingxi.web.controller.master.product.service.IProdVoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 商品Service业务层处理
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Service
+public class ProdServiceVoImpl extends ProdServiceImpl implements IProdVoService {
+    @Resource
+    private ProdVoMapper prodVoMapper;
+
+    /**
+     * 查询商品
+     *
+     * @param id 商品主键
+     * @return 商品
+     */
+    @Override
+    public ProdVo selectProdVoById(Long id) {
+        return prodVoMapper.selectProdVoById(id);
+    }
+
+    /**
+     * 查询商品列表
+     *
+     * @param prodVo 商品
+     * @return 商品
+     */
+    @Override
+    public List<ProdVo> selectProdVoList(ProdVo prodVo) {
+        return prodVoMapper.selectProdVoList(prodVo);
+    }
+}

+ 55 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdVoMapper.xml

@@ -0,0 +1,55 @@
+<?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.xingxi.web.controller.master.product.mapper.ProdVoMapper">
+    <resultMap type="ProdVo" id="ProdResult">
+        <result property="id"    column="id"    />
+        <result property="prodClassId"    column="prodClassId"    />
+        <result property="prodName"    column="prodName"    />
+        <result property="ipId"    column="ipId"    />
+        <result property="designerId"    column="designerId"    />
+        <result property="description"    column="description"    />
+        <result property="prodStatus"    column="prodStatus"    />
+        <result property="thirdIdConfirmFlag"    column="thirdIdConfirmFlag"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="createUser"    column="createUser"    />
+        <result property="createTime"    column="createTime"    />
+        <result property="updateUser"    column="updateUser"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="prodClass"    column="updateTime"    />
+        <result property="prodName"    column="updateTime"    />
+        <result property="ipName"    column="updateTime"    />
+        <result property="designerName"    column="updateTime"    />
+        <result property="prodDesc"    column="updateTime"    />
+    </resultMap>
+
+    <sql id="selectProdVo">
+        select id, prodClassId, prodName, ipId, designerId, description, prodStatus, thirdIdConfirmFlag, delFlag, createUser, createTime, updateUser, updateTime from m_prod
+    </sql>
+
+    <select id="selectProdVoList" parameterType="ProdVo" resultMap="ProdResult">
+        <include refid="selectProdVo"/>
+        <where>  
+            <if test="prodClassId != null "> and prodClassId = #{prodClassId}</if>
+            <if test="prodName != null  and prodName != ''"> and prodName like concat('%', #{prodName}, '%')</if>
+            <if test="ipId != null "> and ipId = #{ipId}</if>
+            <if test="designerId != null "> and designerId = #{designerId}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+            <if test="prodStatus != null  and prodStatus != ''"> and prodStatus = #{prodStatus}</if>
+            <if test="thirdIdConfirmFlag != null  and thirdIdConfirmFlag != ''"> and thirdIdConfirmFlag = #{thirdIdConfirmFlag}</if>
+            <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
+            <if test="createTime != null "> and createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectProdVoById" parameterType="Long" resultMap="ProdResult">
+        <include refid="selectProdVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectProdClassList" parameterType="String" resultType="ProdClass">
+        select * from m_prod_class where delFlag = '0'
+    </select>
+</mapper>

+ 18 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/add.html

@@ -28,7 +28,7 @@
                 <div class="form-group">
                     <label class="col-sm-3 control-label">设计师描述:</label>
                     <div class="col-sm-8">
-                        <textarea name="description" class="form-control"></textarea>
+                        <textarea name="description" class="form-control" style="width: 455px; height: 300px; resize: none;"></textarea>
                     </div>
                 </div>
             </div>
@@ -81,12 +81,29 @@
             }
         });
 
+        var icon = "<i class='fa fa-times-circle'></i> ";
         $("#form-designer-add").validate({
+            rules: {
+                designerName: {
+                    required: true
+                },
+                description: {
+                    maxlength: 4000
+                }
+            },
+            messages: {
+                designerName: icon + "请输入设计者昵称",
+                description: icon + "设计者描述最多输入4000字"
+            },
             focusCleanup: true
         });
 
         function submitHandler() {
             if ($.validate.form()) {
+                if ($("#designerAvatar").val() === "") {
+                    $.modal.alertError("请上传设计师的头像");
+                    return;
+                }
                 $.operate.save(prefix + "/add", $('#form-designer-add').serialize());
             }
         }

+ 17 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/edit.html

@@ -29,7 +29,7 @@
                 <div class="form-group">
                     <label class="col-sm-3 control-label">设计师描述:</label>
                     <div class="col-sm-8">
-                        <textarea name="description" class="form-control">[[*{description}]]</textarea>
+                        <textarea name="description" class="form-control" style="width: 455px; height: 300px; resize: none;">[[*{description}]]</textarea>
                     </div>
                 </div>
             </div>
@@ -83,11 +83,27 @@
         });
 
         $("#form-designer-edit").validate({
+            rules: {
+                designerName: {
+                    required: true
+                },
+                description: {
+                    maxlength: 4000
+                }
+            },
+            messages: {
+                designerName: icon + "请输入设计者昵称",
+                description: icon + "设计者描述最多输入4000字"
+            },
             focusCleanup: true
         });
 
         function submitHandler() {
             if ($.validate.form()) {
+                if ($("#designerAvatar").val() === "") {
+                    $.modal.alertError("请上传设计师的头像");
+                    return;
+                }
                 $.operate.save(prefix + "/edit", $('#form-designer-edit').serialize());
             }
         }

+ 26 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/add.html

@@ -90,11 +90,37 @@
         });
 
         $("#form-ipInfo-add").validate({
+            rules: {
+                ipName: {
+                    required: true
+                },
+                colorNo: {
+                    required: true,
+                    digits: true
+                },
+                sort: {
+                    required: true,
+                    digits: true
+                }
+            },
+            messages: {
+                ipName: icon + "请输入文创品牌名称",
+                colorNo: {
+                    required: icon + "请输入使用的色号"
+                },
+                sort: {
+                    required: icon + "请输入排序号"
+                }
+            },
             focusCleanup: true
         });
 
         function submitHandler() {
             if ($.validate.form()) {
+                if ($("#ipUrl").val() === "") {
+                    $.modal.alertError("请上传文创的简介图片");
+                    return;
+                }
                 $.operate.save(prefix + "/add", $('#form-ipInfo-add').serialize());
             }
         }

+ 26 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/edit.html

@@ -99,11 +99,37 @@
         });
 
         $("#form-ipInfo-edit").validate({
+            rules: {
+                ipName: {
+                    required: true
+                },
+                colorNo: {
+                    required: true,
+                    digits: true
+                },
+                sort: {
+                    required: true,
+                    digits: true
+                }
+            },
+            messages: {
+                ipName: icon + "请输入文创品牌名称",
+                colorNo: {
+                    required: icon + "请输入使用的色号"
+                },
+                sort: {
+                    required: icon + "请输入排序号"
+                }
+            },
             focusCleanup: true
         });
 
         function submitHandler() {
             if ($.validate.form()) {
+                if ($("#ipUrl").val() === "") {
+                    $.modal.alertError("请上传文创的简介图片");
+                    return;
+                }
                 $.operate.save(prefix + "/edit", $('#form-ipInfo-edit').serialize());
             }
         }

+ 5 - 2
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/ipInfo/ipInfo.html

@@ -61,11 +61,14 @@
                     },
                     {
                         field: 'ipName',
-                        title: '文创品牌名'
+                        title: '文创简介'
                     },
                     {
                         field: 'ipUrl',
-                        title: 'IP图片'
+                        title: 'IP图片',
+                        formatter: function(value, row, index) {
+                            return $.table.imageView(value);
+                        }
                     },
                     {
                         field: 'colorNo',

+ 83 - 87
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/product/prod/prod.html

@@ -7,42 +7,51 @@
      <div class="container-div">
         <div class="row">
             <div class="col-sm-12 search-collapse">
-                <form id="formId">
-                    <div class="select-list">
-                        <ul>
-                            <li>
-                                <label>商品ID:</label>
-                                <input type="text" name="prodId"/>
-                            </li>
-                            <li>
-                                <label>顺序:</label>
-                                <input type="text" name="sort"/>
-                            </li>
-                            <li>
-                                <label>删除标志:</label>
-                                <input type="text" name="delFlag"/>
-                            </li>
-                            <li>
-                                <label>创建者:</label>
-                                <input type="text" name="createUser"/>
-                            </li>
-                            <li>
-                                <label>创建时间:</label>
-                                <input type="text" class="time-input" placeholder="请选择创建时间" name="createTime"/>
-                            </li>
-                            <li>
-                                <label>更新者:</label>
-                                <input type="text" name="updateUser"/>
-                            </li>
-                            <li>
-                                <label>更新时间:</label>
-                                <input type="text" class="time-input" placeholder="请选择更新时间" name="updateTime"/>
-                            </li>
-                            <li>
-                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
-                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
-                            </li>
-                        </ul>
+                <form id="formId" class="form-horizontal m-t">
+                    <div class="form-group">
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">商品分类:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <select name="prodClass" th:with="prodClasses=${@product.getProdClasses()}">
+                                <option value="">所有</option>
+                                <option th:each="prodClass : ${prodClasses}" th:text="${prodClass.className}" th:value="${prodClass.prodClassId}"></option>
+                            </select>
+                        </div>
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">商品名称:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <input type="text" class="form-control" name="prodName">
+                        </div>
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">文创名称:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <input type="text" class="form-control" name="ipName">
+                        </div>
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">设计师名称:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <input type="text" class="form-control" name="designerName">
+                        </div>
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">商品描述:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <input type="text" class="form-control" name="prodDesc">
+                        </div>
+                        <div style="margin-left: 15px; width: 100px; float: left;">
+                            <label class="control-label">商品状态:</label>
+                        </div>
+                        <div style="width: 150px; float: left;">
+                            <input type="text" class="form-control" name="prodStatus">
+                        </div>
+                        <div style="margin-left: 15px; float: left;">
+                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                        </div>
                     </div>
                 </form>
             </div>
@@ -57,9 +66,6 @@
                 <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:prod:remove">
                     <i class="fa fa-remove"></i> 删除
                 </a>
-                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:prod:export">
-                    <i class="fa fa-download"></i> 导出
-                </a>
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
@@ -68,9 +74,9 @@
     </div>
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
-        var editFlag = [[${@permission.hasPermi('system:prod:edit')}]];
-        var removeFlag = [[${@permission.hasPermi('system:prod:remove')}]];
-        var prefix = ctx + "system/prod";
+        var editFlag = [[${@permission.hasPermi('master:product:prod:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('master:product:prod:add:remove')}]];
+        var prefix = ctx + "master/product/prod";
 
         $(function() {
             var options = {
@@ -80,52 +86,42 @@
                 removeUrl: prefix + "/remove",
                 exportUrl: prefix + "/export",
                 modalName: "推荐商品",
-                columns: [{
-                    checkbox: true
-                },
-                {
-                    field: 'id',
-                    title: '主键',
-                    visible: false
-                },
-                {
-                    field: 'prodId',
-                    title: '商品ID'
-                },
-                {
-                    field: 'sort',
-                    title: '顺序'
-                },
-                {
-                    field: 'delFlag',
-                    title: '删除标志'
-                },
-                {
-                    field: 'createUser',
-                    title: '创建者'
-                },
-                {
-                    field: 'createTime',
-                    title: '创建时间'
-                },
-                {
-                    field: 'updateUser',
-                    title: '更新者'
-                },
-                {
-                    field: 'updateTime',
-                    title: '更新时间'
-                },
-                {
-                    title: '操作',
-                    align: 'center',
-                    formatter: function(value, row, index) {
-                        var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
-                        return actions.join('');
+                columns: [
+                    {
+                        field: 'prodName',
+                        title: '商品名称'
+                    },
+                    {
+                        field: 'prodClass',
+                        title: '商品分类'
+                    },
+                    {
+                        field: 'ipName',
+                        title: '文创品牌'
+                    },
+                    {
+                        field: 'designerName',
+                        title: '设计师名称'
+                    },
+                    {
+                        field: 'prodDesc',
+                        title: '商品描述'
+                    },
+                    {
+                        field: 'prodStatus',
+                        title: '商品状态'
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
                     }
-                }]
+                ]
             };
             $.table.init(options);
         });

+ 37 - 15
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/constant/UserConstants.java

@@ -2,44 +2,63 @@ package com.xingxi.common.constant;
 
 /**
  * 用户常量信息
- * 
- * @author ruoyi
+ *
+ * @author xingxi
  */
-public class UserConstants
-{
+public class UserConstants {
     /**
      * 平台内系统用户的唯一标志
      */
     public static final String SYS_USER = "SYS_USER";
 
-    /** 正常状态 */
+    /**
+     * 正常状态
+     */
     public static final String NORMAL = "0";
 
-    /** 异常状态 */
+    /**
+     * 异常状态
+     */
     public static final String EXCEPTION = "1";
 
-    /** 用户封禁状态 */
+    /**
+     * 用户封禁状态
+     */
     public static final String USER_DISABLE = "1";
 
-    /** 角色正常状态 */
+    /**
+     * 角色正常状态
+     */
     public static final String ROLE_NORMAL = "0";
 
-    /** 角色封禁状态 */
+    /**
+     * 角色封禁状态
+     */
     public static final String ROLE_DISABLE = "1";
 
-    /** 部门正常状态 */
+    /**
+     * 部门正常状态
+     */
     public static final String DEPT_NORMAL = "0";
 
-    /** 部门停用状态 */
+    /**
+     * 部门停用状态
+     */
     public static final String DEPT_DISABLE = "1";
 
-    /** 字典正常状态 */
+    /**
+     * 字典正常状态
+     */
     public static final String DICT_NORMAL = "0";
 
-    /** 是否为系统默认(是) */
+    /**
+     * 是否为系统默认(是)
+     */
     public static final String YES = "Y";
-    
-    /** 是否唯一的返回标识 */
+
+    /**
+     * 是否唯一的返回标识
+     */
     public final static boolean UNIQUE = true;
     public final static boolean NOT_UNIQUE = false;
 
@@ -70,4 +89,7 @@ public class UserConstants
      * 邮箱格式限制
      */
     public static final String EMAIL_PATTERN = "^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?";
+    /** 字典类型是否唯一的返回结果码 */
+    public final static String DICT_TYPE_UNIQUE = "0";
+    public final static String DICT_TYPE_NOT_UNIQUE = "1";
 }

+ 8 - 8
08.src/Xingxi/xingxi-framework/src/main/java/com/xingxi/framework/web/service/DictService.java

@@ -1,24 +1,24 @@
 package com.xingxi.framework.web.service;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.xingxi.common.core.domain.entity.SysDictData;
 import com.xingxi.system.service.ISysDictDataService;
 import com.xingxi.system.service.ISysDictTypeService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * RuoYi首创 html调用 thymeleaf 实现字典读取
  * 
- * @author ruoyi
+ * @author xingxi
  */
 @Service("dict")
-public class DictService
-{
-    @Autowired
+public class DictService {
+    @Resource
     private ISysDictTypeService dictTypeService;
 
-    @Autowired
+    @Resource
     private ISysDictDataService dictDataService;
 
     /**

+ 23 - 17
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/master/ipInfo/service/impl/IpInfoServiceImpl.java

@@ -1,7 +1,9 @@
 package com.xingxi.master.ipInfo.service.impl;
 
 import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.utils.DateUtils;
+import com.xingxi.common.utils.ShiroUtils;
 import com.xingxi.master.ipInfo.domain.IpInfo;
 import com.xingxi.master.ipInfo.mapper.IpInfoMapper;
 import com.xingxi.master.ipInfo.service.IIpInfoService;
@@ -35,47 +37,51 @@ public class IpInfoServiceImpl implements IIpInfoService {
     /**
      * 查询文创品牌列表
      *
-     * @param IpInfo 文创品牌
+     * @param ipInfo 文创品牌
      * @return 文创品牌
      */
     @Override
-    public List<IpInfo> selectIpInfoList(IpInfo IpInfo) {
-        return ipInfoMapper.selectIpInfoList(IpInfo);
+    public List<IpInfo> selectIpInfoList(IpInfo ipInfo) {
+        return ipInfoMapper.selectIpInfoList(ipInfo);
     }
 
     /**
      * 新增文创品牌
      *
-     * @param IpInfo 文创品牌
+     * @param ipInfo 文创品牌
      * @return 结果
      */
     @Override
-    public int insertIpInfo(IpInfo IpInfo) {
-        IpInfo.setCreateTime(DateUtils.getNowDate());
-        return ipInfoMapper.insertIpInfo(IpInfo);
+    public int insertIpInfo(IpInfo ipInfo) {
+        ipInfo.setDelFlag(EDelFlag.NO.getVal());
+        ipInfo.setCreateUser(ShiroUtils.getLoginName());
+        ipInfo.setCreateTime(DateUtils.getNowDate());
+        return ipInfoMapper.insertIpInfo(ipInfo);
     }
 
     /**
      * 新增文创品牌
      *
-     * @param IpInfoList 文创品牌
+     * @param ipInfoList 文创品牌
      * @return 结果
      */
     @Override
-    public int batchInsertIpInfo(List<IpInfo> IpInfoList) {
-        return ipInfoMapper.batchInsertIpInfo(IpInfoList);
+    public int batchInsertIpInfo(List<IpInfo> ipInfoList) {
+        return ipInfoMapper.batchInsertIpInfo(ipInfoList);
     }
 
     /**
      * 修改文创品牌
      *
-     * @param IpInfo 文创品牌
+     * @param ipInfo 文创品牌
      * @return 结果
      */
     @Override
-    public int updateIpInfo(IpInfo IpInfo) {
-        IpInfo.setUpdateTime(DateUtils.getNowDate());
-        return ipInfoMapper.updateIpInfo(IpInfo);
+    public int updateIpInfo(IpInfo ipInfo) {
+        ipInfo.setUpdateUser(ShiroUtils.getLoginName());
+        ipInfo.setUpdateTime(DateUtils.getNowDate());
+        ipInfo.setDelFlag(EDelFlag.NO.getVal());
+        return ipInfoMapper.updateIpInfo(ipInfo);
     }
 
     /**
@@ -125,11 +131,11 @@ public class IpInfoServiceImpl implements IIpInfoService {
     /**
      * 逻辑批量删除文创品牌
      *
-     * @param IpInfo 文创品牌
+     * @param ipInfo 文创品牌
      * @return 结果
      */
     @Override
-    public int logicDeleteIpInfoByCondition(IpInfo IpInfo) {
-        return ipInfoMapper.logicDeleteIpInfoByCondition(IpInfo);
+    public int logicDeleteIpInfoByCondition(IpInfo ipInfo) {
+        return ipInfoMapper.logicDeleteIpInfoByCondition(ipInfo);
     }
 }

+ 2 - 1
08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/IpInfoMapper.xml

@@ -26,18 +26,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ipName != null  and ipName != ''"> and ipName like concat('%', #{ipName}, '%')</if>
             <if test="ipUrl != null  and ipUrl != ''"> and ipUrl = #{ipUrl}</if>
             <if test="colorNo != null  and colorNo != ''"> and colorNo = #{colorNo}</if>
-            <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
             <if test="createTime != null "> and createTime = #{createTime}</if>
             <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
             <if test="updateTime != null "> and updateTime = #{updateTime}</if>
         </where>
+        order by sort
     </select>
     
     <select id="selectIpInfoByIpId" parameterType="Long" resultMap="IpInfoResult">
         <include refid="selectIpInfo"/>
         where ipId = #{ipId}
+        order by sort
     </select>
         
     <insert id="insertIpInfo" parameterType="IpInfo" useGeneratedKeys="true" keyProperty="ipId">

+ 2 - 1
08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/ProdClassMapper.xml

@@ -24,18 +24,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="className != null  and className != ''"> and className like concat('%', #{className}, '%')</if>
             <if test="classUrl != null  and classUrl != ''"> and classUrl = #{classUrl}</if>
-            <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
             <if test="createTime != null "> and createTime = #{createTime}</if>
             <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
             <if test="updateTime != null "> and updateTime = #{updateTime}</if>
         </where>
+        order by sort
     </select>
     
     <select id="selectProdClassByProdClassId" parameterType="Long" resultMap="ProdClassResult">
         <include refid="selectProdClass"/>
         where prodClassId = #{prodClassId}
+        order by sort
     </select>
         
     <insert id="insertProdClass" parameterType="ProdClass" useGeneratedKeys="true" keyProperty="prodClassId">

+ 2 - 0
08.src/Xingxi/xingxi-system/src/main/resources/mapper/master/ProdPicMapper.xml

@@ -31,11 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
             <if test="updateTime != null "> and updateTime = #{updateTime}</if>
         </where>
+        order by sort
     </select>
     
     <select id="selectProdPicById" parameterType="Long" resultMap="ProdPicResult">
         <include refid="selectProdPic"/>
         where id = #{id}
+        order by sort
     </select>
         
     <insert id="insertProdPic" parameterType="ProdPic" useGeneratedKeys="true" keyProperty="id">