Explorar el Código

老后台颜选商城迁移

zhijiezhao hace 1 año
padre
commit
9d6478a32f
Se han modificado 23 ficheros con 924 adiciones y 36 borrados
  1. 0 15
      pom.xml
  2. 46 0
      src/main/java/com/caimei365/manager/controller/hehe/floor/HomeApi.java
  3. 59 0
      src/main/java/com/caimei365/manager/controller/hehe/product/ProductApi.java
  4. 53 0
      src/main/java/com/caimei365/manager/controller/hehe/user/UserApi.java
  5. 0 21
      src/main/java/com/caimei365/manager/controller/yanxuan/testApi.java
  6. 15 0
      src/main/java/com/caimei365/manager/dao/hehe/HeHeHomeDao.java
  7. 20 0
      src/main/java/com/caimei365/manager/dao/hehe/HeHeProductDao.java
  8. 13 0
      src/main/java/com/caimei365/manager/dao/hehe/HeHeUserDao.java
  9. 30 0
      src/main/java/com/caimei365/manager/entity/hehe/floor/HeHeHomeType.java
  10. 50 0
      src/main/java/com/caimei365/manager/entity/hehe/floor/ProductFloor.java
  11. 51 0
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeActivity.java
  12. 49 0
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeBigType.java
  13. 95 0
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeProduct.java
  14. 41 0
      src/main/java/com/caimei365/manager/entity/hehe/user/HeHeUser.java
  15. 13 0
      src/main/java/com/caimei365/manager/service/hehe/floor/HeHeHomeService.java
  16. 37 0
      src/main/java/com/caimei365/manager/service/hehe/floor/impl/HeHeHomeServiceImpl.java
  17. 15 0
      src/main/java/com/caimei365/manager/service/hehe/product/HeHeProductService.java
  18. 66 0
      src/main/java/com/caimei365/manager/service/hehe/product/impl/HeHeProductServiceImpl.java
  19. 16 0
      src/main/java/com/caimei365/manager/service/hehe/user/HeHeUserService.java
  20. 39 0
      src/main/java/com/caimei365/manager/service/hehe/user/impl/HeHeUserServiceImpl.java
  21. 42 0
      src/main/resources/mapper/hehe/HeHeHomeDao.xml
  22. 148 0
      src/main/resources/mapper/hehe/HeHeProductDao.xml
  23. 26 0
      src/main/resources/mapper/hehe/HeHeUserDao.xml

+ 0 - 15
pom.xml

@@ -52,21 +52,6 @@
             </exclusions>
         </dependency>
 
-
-        <dependency>
-            <!--检测spring的web请求信息,生成检测结果(json格式) -->
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <version>2.9.2</version>
-        </dependency>
-        <dependency>
-            <!--根据springfox-swagger2生成的数据,生成可视化的友好页面 -->
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>2.9.2</version>
-        </dependency>
-
-
         <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>

+ 46 - 0
src/main/java/com/caimei365/manager/controller/hehe/floor/HomeApi.java

@@ -0,0 +1,46 @@
+package com.caimei365.manager.controller.hehe.floor;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.floor.HeHeHomeType;
+import com.caimei365.manager.entity.hehe.floor.ProductFloor;
+import com.caimei365.manager.service.hehe.floor.HeHeHomeService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/HeHe")
+public class HomeApi {
+    @Resource
+    private HeHeHomeService homeService;
+
+    /**
+     * 首页分类导航
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/homeType/list")
+    public ResponseJson<PaginationVo<HeHeHomeType>> homeTypeList(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                 @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return homeService.homeTypeList(pageNum, pageSize);
+    }
+
+    /**
+     * 商品楼层列表
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/product/floor")
+    public ResponseJson<PaginationVo<ProductFloor>> productFloor(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                 @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return homeService.productFloor(pageNum, pageSize);
+    }
+
+
+}

+ 59 - 0
src/main/java/com/caimei365/manager/controller/hehe/product/ProductApi.java

@@ -0,0 +1,59 @@
+package com.caimei365.manager.controller.hehe.product;
+
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.product.HeHeActivity;
+import com.caimei365.manager.entity.hehe.product.HeHeBigType;
+import com.caimei365.manager.entity.hehe.product.HeHeProduct;
+import com.caimei365.manager.service.hehe.product.HeHeProductService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/HeHe")
+public class ProductApi {
+
+    @Resource
+    private HeHeProductService productService;
+
+    /**
+     * 商品管理
+     * @param product
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/product/list")
+    public ResponseJson<PaginationVo<HeHeProduct>> userList(HeHeProduct product,
+                                                            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                            @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return productService.productList(product, pageNum, pageSize);
+    }
+
+    /**
+     * 商品分类管理
+     * @param type
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/product/bigType")
+    public ResponseJson<PaginationVo<HeHeBigType>> getBigType(HeHeBigType type,
+                                   @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                   @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return productService.bigTypeList(type, pageNum, pageSize);
+    }
+
+
+    @GetMapping("/product/active")
+    public ResponseJson<PaginationVo<HeHeActivity>> getActive(HeHeActivity activity,
+                                                              @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                              @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return productService.activeList(activity, pageNum, pageSize);
+    }
+}

+ 53 - 0
src/main/java/com/caimei365/manager/controller/hehe/user/UserApi.java

@@ -0,0 +1,53 @@
+package com.caimei365.manager.controller.hehe.user;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.product.HeHeBigType;
+import com.caimei365.manager.entity.hehe.user.HeHeUser;
+import com.caimei365.manager.service.hehe.user.HeHeUserService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @author zzj
+ */
+@RestController
+@RequestMapping("/HeHe")
+public class UserApi {
+
+    @Resource
+    private HeHeUserService userService;
+
+    /**
+     * 分销者列表
+     *
+     * @param man
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/sales/list")
+    public ResponseJson<PaginationVo<HeHeUser>> salesList(HeHeUser man,
+                                                          @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                          @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return userService.SalesList(man, pageNum, pageSize);
+    }
+
+    /**
+     * 呵呵用户列表
+     * @param man
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/user/list")
+    public ResponseJson<PaginationVo<HeHeUser>> userList(HeHeUser man,
+                                                         @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                         @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return userService.userList(man, pageNum, pageSize);
+    }
+}

+ 0 - 21
src/main/java/com/caimei365/manager/controller/yanxuan/testApi.java

@@ -1,21 +0,0 @@
-package com.caimei365.manager.controller.yanxuan;
-
-import com.caimei365.manager.entity.ResponseJson;
-import com.caimei365.manager.utils.HttpUtil;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping("/yanxuan")
-@Api(tags = "测试")
-public class testApi {
-
-    @ApiOperation("测试接口")
-    @GetMapping("/test")
-    public ResponseJson test() {
-        return ResponseJson.success("测试");
-    }
-}

+ 15 - 0
src/main/java/com/caimei365/manager/dao/hehe/HeHeHomeDao.java

@@ -0,0 +1,15 @@
+package com.caimei365.manager.dao.hehe;
+
+import com.caimei365.manager.entity.hehe.floor.HeHeHomeType;
+import com.caimei365.manager.entity.hehe.floor.ProductFloor;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface HeHeHomeDao {
+
+    List<HeHeHomeType> findHomeTypeList();
+
+    List<ProductFloor> findProductFloor();
+}

+ 20 - 0
src/main/java/com/caimei365/manager/dao/hehe/HeHeProductDao.java

@@ -0,0 +1,20 @@
+package com.caimei365.manager.dao.hehe;
+
+import com.caimei365.manager.entity.hehe.product.HeHeActivity;
+import com.caimei365.manager.entity.hehe.product.HeHeBigType;
+import com.caimei365.manager.entity.hehe.product.HeHeProduct;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface HeHeProductDao {
+
+    List<HeHeProduct> findProductList(HeHeProduct product);
+
+    HeHeProduct findProductElement(Integer productId);
+
+    List<HeHeBigType> findBigTypeList(HeHeBigType type);
+
+    List<HeHeActivity> findActivityList(HeHeActivity activity);
+}

+ 13 - 0
src/main/java/com/caimei365/manager/dao/hehe/HeHeUserDao.java

@@ -0,0 +1,13 @@
+package com.caimei365.manager.dao.hehe;
+
+
+import com.caimei365.manager.entity.hehe.user.HeHeUser;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface HeHeUserDao {
+
+    List<HeHeUser> findList(HeHeUser man);
+}

+ 30 - 0
src/main/java/com/caimei365/manager/entity/hehe/floor/HeHeHomeType.java

@@ -0,0 +1,30 @@
+package com.caimei365.manager.entity.hehe.floor;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class HeHeHomeType {
+    /**
+     * 分类名称
+     */
+    private String name;
+    /**
+     * 图标
+     */
+    private String icon;
+    /**
+     * 排序值
+     */
+    private Integer sort;
+    /**
+     * 状态:0已下架,1已上架
+     */
+    private Integer status;
+    /**
+     * 添加时间
+     */
+    private Date addTime;
+
+}

+ 50 - 0
src/main/java/com/caimei365/manager/entity/hehe/floor/ProductFloor.java

@@ -0,0 +1,50 @@
+package com.caimei365.manager.entity.hehe.floor;
+
+import lombok.Data;
+
+
+@Data
+public class ProductFloor {
+
+    private String id;
+    /**
+     * 页面信息ID
+     */
+    private String pageId;
+    /**
+     * 楼层名称
+     */
+    private String title;
+    /**
+     * 描述
+     */
+    private String description;
+    /**
+     * 链接
+     */
+    private String link;
+    /**
+     * 排序
+     */
+    private Integer sort;
+    /**
+     * pc状态
+     */
+    private String enabledStatus;
+    /**
+     * 1表示二级列表 2.表示项目详情 (用来区分网页列表中更多链接标签)
+     */
+    private String type;
+    /**
+     * 中层项目图片数量
+     */
+    private Long imageNum;
+    /**
+     * 小程序状态 0停用 1启用
+     */
+    private String crmEnabledStatus;
+    /**
+     * 图片信息json格式数据
+     */
+    private String images;
+}

+ 51 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeActivity.java

@@ -0,0 +1,51 @@
+package com.caimei365.manager.entity.hehe.product;
+
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 呵呵商城活动Entity
+ */
+@Data
+public class HeHeActivity  {
+
+	/**
+	 * 活动名称
+	 */
+	private String name;
+	/**
+	 * 小程序状态:1启用,2停用
+	 */
+	private String status;
+	/**
+	 * 小程序列表缩略图
+	 */
+	private String listImage;
+	/**
+	 * 小程序详情主题图
+	 */
+	private String detailsImage;
+	/**
+	 * 开始时间
+	 */
+	private Date beginTime;
+	/**
+	 * 结束时间
+	 */
+	private Date endTime;
+	/**
+	 * 创建时间
+	 */
+	private Date addTime;
+//	/**
+//	 * 活动状态:1未开始,2进行中,3已结束
+//	 */
+//	private Integer activityStatus;
+	/**
+	 * 是否被选中
+	 */
+    private Boolean checked;
+
+}

+ 49 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeBigType.java

@@ -0,0 +1,49 @@
+package com.caimei365.manager.entity.hehe.product;
+
+import lombok.Data;
+
+@Data
+public class HeHeBigType {
+
+    private String bigTypeId;
+    /**
+     * 分类类型,1产品,2仪器
+     */
+    private String typeSort;
+    /**
+     * 商城类型:1采美商城,2呵呵商城
+     */
+    private Integer mallType;
+    /**
+     * name
+     */
+    private String name;
+    /**
+     * 大分类编码
+     */
+    private String bigTypeCode;
+    /**
+     * www启用标识,0停用,1启用
+     */
+    private String wwwValidFlag;
+    /**
+     * 小程序启用标识,0停用,1启用
+     */
+    private String crmValidFlag;
+    /**
+     * www图标
+     */
+    private String wwwIcon;
+    /**
+     * 小程序图标
+     */
+    private String crmIcon;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * sortIndex
+     */
+    private Integer sortIndex;
+}

+ 95 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeProduct.java

@@ -0,0 +1,95 @@
+package com.caimei365.manager.entity.hehe.product;
+
+import com.caimei365.manager.entity.caimei.svip.CmSku;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class HeHeProduct {
+    /**
+     * 对应采美商品id
+     */
+    private Integer productId;
+    /**
+     * 上架状态:1上架,2下架
+     */
+    private String validFlag;
+    /**
+     * 售价
+     */
+    private BigDecimal price;
+    /**
+     * 是否含税 0不含税,1含税
+     */
+    private String includedTax;
+    /**
+     * 发票类型(基于是否含税基础) 1增值税专用发票,2增值税普通发票, 3不能开票
+     */
+    private String invoiceType;
+    /**
+     * 机构税率 :增值税默认13%,普通票6%取值范围[0-100]
+     */
+    private BigDecimal clubTaxPoint;
+    /**
+     * 供应商税率:增值专用发票默认13%,增值税普通发票6%取值范围[0-100]
+     */
+    private BigDecimal shopTaxPoint;
+    /**
+     * 成本价类型:1固定成本 2比例成本
+     */
+    private String costType;
+    /**
+     * 成本价
+     */
+    private BigDecimal costPrice;
+    /**
+     * 比例成本百分比
+     */
+    private BigDecimal shopPercent;
+    /**
+     * 旧商品id
+     */
+    private Integer oldProductId;
+    /**
+     * 添加时间
+     */
+    private Date addTime;
+    /**
+     * 商品名称
+     */
+    private String name;
+    /**
+     * 商品图片
+     */
+    private String mainImage;
+    /**
+     * 供应商名称
+     */
+    private String shopName;
+    /**
+     * 刚添加的活动id
+     */
+    private List<Integer> ids;
+    /**
+     * 一级分类id
+     */
+    private Integer bigTypeId;
+    /**
+     * 二级分类id
+     */
+    private Integer smallTypeId;
+    /**
+     * 活动id
+     */
+    private Integer activityId;
+    /**
+     * 楼层id,以,隔开
+     */
+    private String floorIds;
+
+    private List<CmSku> skus;
+
+}

+ 41 - 0
src/main/java/com/caimei365/manager/entity/hehe/user/HeHeUser.java

@@ -0,0 +1,41 @@
+package com.caimei365.manager.entity.hehe.user;
+
+import lombok.Data;
+
+import java.util.Date;
+
+
+/**
+ * @author zzj
+ */
+@Data
+public class HeHeUser {
+    /**
+     * 	对应user表用户id
+     */
+    private Integer userId;
+    /**
+     *  姓名
+     */
+    private String name;
+    /**
+     * 手机号
+     */
+    private String mobile;
+    /**
+     * 用户身份:1普通用户,2分销者
+     */
+    private Integer userIdentity;
+    /**
+     * 微信昵称
+     */
+    private String nickName;
+    /**
+     * 微信openid
+     */
+    private String openId;
+    /**
+     * 添加时间
+     */
+    private Date addTime;
+}

+ 13 - 0
src/main/java/com/caimei365/manager/service/hehe/floor/HeHeHomeService.java

@@ -0,0 +1,13 @@
+package com.caimei365.manager.service.hehe.floor;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.floor.HeHeHomeType;
+import com.caimei365.manager.entity.hehe.floor.ProductFloor;
+
+public interface HeHeHomeService {
+
+    ResponseJson<PaginationVo<HeHeHomeType>> homeTypeList(int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<ProductFloor>> productFloor(int pageNum, int pageSize);
+}

+ 37 - 0
src/main/java/com/caimei365/manager/service/hehe/floor/impl/HeHeHomeServiceImpl.java

@@ -0,0 +1,37 @@
+package com.caimei365.manager.service.hehe.floor.impl;
+
+
+import com.caimei365.manager.dao.hehe.HeHeHomeDao;
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.floor.HeHeHomeType;
+import com.caimei365.manager.entity.hehe.floor.ProductFloor;
+import com.caimei365.manager.service.hehe.floor.HeHeHomeService;
+import com.github.pagehelper.PageHelper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class HeHeHomeServiceImpl implements HeHeHomeService {
+
+    @Resource
+    private HeHeHomeDao homeDao;
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeHomeType>> homeTypeList(int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeHomeType> list = homeDao.findHomeTypeList();
+        PaginationVo<HeHeHomeType> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
+    @Override
+    public ResponseJson<PaginationVo<ProductFloor>> productFloor(int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<ProductFloor> list = homeDao.findProductFloor();
+        PaginationVo<ProductFloor> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+}

+ 15 - 0
src/main/java/com/caimei365/manager/service/hehe/product/HeHeProductService.java

@@ -0,0 +1,15 @@
+package com.caimei365.manager.service.hehe.product;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.product.HeHeActivity;
+import com.caimei365.manager.entity.hehe.product.HeHeBigType;
+import com.caimei365.manager.entity.hehe.product.HeHeProduct;
+
+public interface HeHeProductService {
+    ResponseJson<PaginationVo<HeHeProduct>> productList(HeHeProduct product, int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<HeHeBigType>>  bigTypeList(HeHeBigType type, int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<HeHeActivity>> activeList(HeHeActivity activity, int pageNum, int pageSize);
+}

+ 66 - 0
src/main/java/com/caimei365/manager/service/hehe/product/impl/HeHeProductServiceImpl.java

@@ -0,0 +1,66 @@
+package com.caimei365.manager.service.hehe.product.impl;
+
+
+import com.caimei.utils.AppUtils;
+import com.caimei.utils.MathUtil;
+import com.caimei365.manager.config.thinkgem.Global;
+import com.caimei365.manager.dao.hehe.HeHeProductDao;
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.product.HeHeActivity;
+import com.caimei365.manager.entity.hehe.product.HeHeBigType;
+import com.caimei365.manager.entity.hehe.product.HeHeProduct;
+import com.caimei365.manager.service.hehe.product.HeHeProductService;
+import com.github.pagehelper.PageHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Service
+@Slf4j
+public class HeHeProductServiceImpl implements HeHeProductService {
+
+    @Resource
+    private HeHeProductDao productDao;
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeProduct>> productList(HeHeProduct product, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeProduct> list = productDao.findProductList(product);
+        String wwwServer = Global.getConfig("wwwServer");
+        list.forEach(p -> {
+            HeHeProduct cp = productDao.findProductElement(p.getProductId());
+            p.setCostPrice(cp.getCostPrice());
+            p.setShopPercent(cp.getShopPercent());
+            p.setCostType(cp.getCostType());
+            p.setPrice(cp.getPrice());
+            //比例成本
+            if ("2".equals(p.getCostType())) {
+                BigDecimal costPrice = MathUtil.div(MathUtil.mul(p.getPrice(), p.getShopPercent()), 100, 2);
+                p.setCostPrice(costPrice);
+            }
+            p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, wwwServer));
+        });
+        PaginationVo<HeHeProduct> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeBigType>> bigTypeList(HeHeBigType type, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeBigType> list = productDao.findBigTypeList(type);
+        PaginationVo<HeHeBigType> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeActivity>> activeList(HeHeActivity activity, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeActivity> list = productDao.findActivityList(activity);
+        PaginationVo<HeHeActivity> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+}

+ 16 - 0
src/main/java/com/caimei365/manager/service/hehe/user/HeHeUserService.java

@@ -0,0 +1,16 @@
+package com.caimei365.manager.service.hehe.user;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.user.HeHeUser;
+
+
+/**
+ * @author zzj
+ */
+public interface HeHeUserService {
+
+    ResponseJson<PaginationVo<HeHeUser>> SalesList(HeHeUser man, int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<HeHeUser>> userList(HeHeUser man, int pageNum, int pageSize);
+}

+ 39 - 0
src/main/java/com/caimei365/manager/service/hehe/user/impl/HeHeUserServiceImpl.java

@@ -0,0 +1,39 @@
+package com.caimei365.manager.service.hehe.user.impl;
+
+
+import com.caimei365.manager.dao.hehe.HeHeUserDao;
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.hehe.user.HeHeUser;
+import com.caimei365.manager.service.hehe.user.HeHeUserService;
+import com.github.pagehelper.PageHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+@Slf4j
+public class HeHeUserServiceImpl implements HeHeUserService {
+
+    @Resource
+    private HeHeUserDao userDao;
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeUser>> SalesList(HeHeUser man, int pageNum, int pageSize) {
+        man.setUserIdentity(2);
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeUser> list = userDao.findList(man);
+        PaginationVo<HeHeUser> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
+    @Override
+    public ResponseJson<PaginationVo<HeHeUser>> userList(HeHeUser man, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<HeHeUser> list = userDao.findList(man);
+        PaginationVo<HeHeUser> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+}

+ 42 - 0
src/main/resources/mapper/hehe/HeHeHomeDao.xml

@@ -0,0 +1,42 @@
+<?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.caimei365.manager.dao.hehe.HeHeHomeDao">
+
+
+    <select id="findHomeTypeList" resultType="com.caimei365.manager.entity.hehe.floor.HeHeHomeType">
+        SELECT a.id      AS "id",
+               a.name    AS "name",
+               a.icon    AS "icon",
+               a.sort    AS "sort",
+               a.status  AS "status",
+               a.addTime AS "addTime"
+        FROM hehe_home_type a
+        ORDER BY ifnull(sort, 10000) ASC, addTime DESC
+    </select>
+
+    <select id="findProductFloor" resultType="com.caimei365.manager.entity.hehe.floor.ProductFloor">
+        SELECT a.id AS "id",
+        a.pageId AS "pageId",
+        a.title AS "title",
+        a.link AS "link",
+        a.sort AS "sort",
+        a.description AS "description",
+        a.enabledStatus AS "enabledStatus",
+        a.crmEnabledStatus AS "crmEnabledStatus",
+        a.createBy AS "createBy.id",
+        a.createDate AS "createDate",
+        a.updateBy AS "updateBy.id",
+        a.updateDate AS "updateDate",
+        (SELECT count(1) FROM cm_page_centre_image a1 WHERE a1.centreId = a.id ) imageNum
+        FROM cm_page_centre a
+        <where>
+            <if test="pageId != null and pageId != ''">
+                AND a.pageId = #{pageId}
+            </if>
+            <if test="title != null and title != ''">
+                AND a.title LIKE concat('%',#{title},'%')
+            </if>
+        </where>
+        ORDER BY -a.sort DESC,a.createDate DESC
+    </select>
+</mapper>

+ 148 - 0
src/main/resources/mapper/hehe/HeHeProductDao.xml

@@ -0,0 +1,148 @@
+<?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.caimei365.manager.dao.hehe.HeHeProductDao">
+
+
+    <select id="findProductList" resultType="com.caimei365.manager.entity.hehe.product.HeHeProduct">
+        SELECT a.id AS "id",
+        a.productId AS "productId",
+        ifnull(a.bigTypeId,0) AS "bigTypeId",
+        ifnull(a.smallTypeId,0) AS "smallTypeId",
+        a.validFlag AS "validFlag",
+        a.includedTax AS "includedTax",
+        a.invoiceType AS "invoiceType",
+        a.clubTaxPoint AS "clubTaxPoint",
+        a.shopTaxPoint AS "shopTaxPoint",
+        a.oldProductId,
+        a.addTime AS "addTime",
+        p.name AS "name",
+        p.mainImage AS "mainImage",
+        s.name AS "shopName",
+        chap.activityId,
+        group_concat(chfp.floorId) as floorIds
+        FROM cm_hehe_product a
+        LEFT JOIN product p ON a.productId = p.productID
+        LEFT JOIN shop s ON s.shopID = p.shopID
+        left join cm_hehe_activity_product chap on a.productId = chap.productId
+        left join cm_hehe_floor_product chfp on a.productId = chfp.productId
+        <where>
+            <if test="productId != null and productId != ''">
+                AND a.productId = #{productId}
+            </if>
+            <if test="validFlag != null and validFlag != ''">
+                AND a.validFlag = #{validFlag}
+            </if>
+            <if test="includedTax != null and includedTax != ''">
+                AND a.includedTax = #{includedTax}
+            </if>
+            <if test="invoiceType != null and invoiceType != ''">
+                AND a.invoiceType = #{invoiceType}
+            </if>
+            <if test="id != null and id != ''">
+                AND a.id = #{id}
+            </if>
+            <if test="name != null and name != ''">
+                AND p.name LIKE CONCAT('%',#{name},'%')
+            </if>
+            <if test="shopName != null and shopName != ''">
+                AND s.name LIKE CONCAT('%',#{shopName},'%')
+            </if>
+        </where>
+        group by a.id
+        ORDER BY addTime DESC
+    </select>
+
+    <select id="findProductElement" resultType="com.caimei365.manager.entity.hehe.product.HeHeProduct">
+        select ifnull(chs.price, 0)                          as price,
+               ifnull(cs.shopPercent, 0)                     as shopPercent,
+               ifnull(cs.organizePercent, 0)                 as organizePercent,
+               ifnull(cs.cmPercent, 0)                       as cmPercent,
+               ifnull((SELECT costCheckFlag
+                       FROM cm_organize_product_info
+                       WHERE productId = cs.productId
+                         AND organizeId = cs.organizeId), 0) as costType,
+               ifnull(cs.costPrice, 0)                       as costPrice,
+               cs.organizeId
+        from cm_sku cs
+                 left join cm_hehe_sku chs on cs.skuId = chs.skuId
+        where cs.productId = #{productId}
+          and cs.organizeId = (SELECT SUBSTRING(groundMall, 1, 1) FROM product WHERE productID = cs.productId)
+        order by chs.price asc
+        limit 1
+    </select>
+
+    <select id="findBigTypeList" resultType="com.caimei365.manager.entity.hehe.product.HeHeBigType">
+        SELECT a.bigTypeID AS "bigTypeID",
+        a.name AS "name",
+        a.bigTypeCode AS "bigTypeCode",
+        a.wwwValidFlag AS "wwwValidFlag",
+        a.crmValidFlag AS "crmValidFlag",
+        a.sortIndex AS "sortIndex",
+        a.wwwIcon AS "wwwIcon",
+        a.crmIcon AS "crmIcon",
+        a.addTime AS "addTime",
+        ifnull(a.typeSort,'0') AS "typeSort",
+        a.mallType
+        FROM bigtype a
+        <where>
+            <if test="bigTypeID != null and bigTypeID != ''">
+                AND a.bigTypeID = #{bigTypeID}
+            </if>
+            <if test="name != null and name != ''">
+                AND a.name LIKE concat('%',#{name},'%')
+            </if>
+            <if test="bigTypeCode != null and bigTypeCode != ''">
+                AND a.bigTypeCode = #{bigTypeCode}
+            </if>
+            <if test="wwwValidFlag != null and wwwValidFlag != ''">
+                AND a.wwwValidFlag = #{wwwValidFlag}
+            </if>
+            <if test="crmValidFlag != null and crmValidFlag != ''">
+                AND a.crmValidFlag = #{crmValidFlag}
+            </if>
+            <if test="sortIndex != null and sortIndex != ''">
+                AND a.sortIndex = #{sortIndex}
+            </if>
+            <if test="typeSort != null and typeSort != '' and typeSort != 'null'">
+                AND a.typeSort = #{typeSort}
+            </if>
+            <if test="null != mallType">
+                and mallType = #{mallType}
+            </if>
+        </where>
+        ORDER BY ifnull(sortIndex,10000) ASC,addTime DESC
+    </select>
+
+    <select id="findActivityList" resultType="com.caimei365.manager.entity.hehe.product.HeHeActivity">
+        SELECT a.id AS "id",
+        a.name AS "name",
+        a.status AS "status",
+        a.listImage AS "listImage",
+        a.detailsImage AS "detailsImage",
+        a.beginTime AS "beginTime",
+        a.endTime AS "endTime",
+        a.addTime AS "addTime",
+        a.delFlag AS "delFlag"
+        FROM cm_hehe_activity a
+        <where>
+            a.delFlag = 0
+            <if test="name != null and name != ''">
+                AND a.name LIKE concat('%',#{name},'%')
+            </if>
+            <if test="status != null and status != ''">
+                AND a.status = #{status}
+            </if>
+            <if test="activityStatus == 1">
+                AND a.beginTime <![CDATA[ > ]]> NOW()
+            </if>
+            <if test="activityStatus == 2">
+                AND NOW() BETWEEN a.beginTime AND a.endTime
+            </if>
+            <if test="activityStatus == 3">
+                AND a.endTime <![CDATA[ < ]]> NOW()
+            </if>
+        </where>
+        ORDER BY addTime DESC
+    </select>
+
+</mapper>

+ 26 - 0
src/main/resources/mapper/hehe/HeHeUserDao.xml

@@ -0,0 +1,26 @@
+<?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.caimei365.manager.dao.hehe.HeHeUserDao">
+
+    <select id="findList" resultType="com.caimei365.manager.entity.hehe.user.HeHeUser">
+        SELECT a.id AS "id", a.userId AS "userId", a.name AS "name", a.mobile AS "mobile", a.userIdentity AS
+        "userIdentity", a.nickName AS "nickName", a.openId AS "openId", a.addTime AS "addTime"
+        FROM cm_hehe_user a
+        <where>
+            <if test="name != null and name != ''">
+                AND a.name LIKE
+            </if>
+            <if test="mobile != null and mobile != ''">
+                AND a.mobile = #{mobile}
+            </if>
+            <if test="userIdentity != null and userIdentity != ''">
+                AND a.userIdentity = #{userIdentity}
+            </if>
+            <if test="nickName != null and nickName != ''">
+                AND a.nickName LIKE concat('%',#{nickName},'%')
+            </if>
+        </where>
+        ORDER BY addTime DESC
+    </select>
+
+</mapper>