Преглед изворни кода

Merge branch 'master' of zcb/kmall-pt-general into master

张创标 пре 4 година
родитељ
комит
7fb572bc1f
57 измењених фајлова са 1507 додато и 329 уклоњено
  1. 2 0
      kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java
  2. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/alarm/Mall2OrderingEarlyWarningRemindsController.java
  3. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/alarm/Mall2ShippingReminderAlarmController.java
  4. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2GoodsTopicHistoryPriceController.java
  5. 43 5
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2GoodsTopicPriceController.java
  6. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2MemberBirthdayController.java
  7. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/store/StoreTopicController.java
  8. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2MemberConsumptionRecordsController.java
  9. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2MemberPointsController.java
  10. 5 5
      kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2PointsRulesController.java
  11. 7 0
      kmall-admin/src/main/java/com/kmall/admin/dao/ProductStoreRelaDao.java
  12. 8 0
      kmall-admin/src/main/java/com/kmall/admin/dao/alarm/Mall2OrderingEarlyWarningRemindsDao.java
  13. 13 0
      kmall-admin/src/main/java/com/kmall/admin/dao/alarm/Mall2ShippingReminderAlarmDao.java
  14. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/mk/Mk2GoodsTopicPriceDao.java
  15. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/mk/store/MkStorePromTypeDao.java
  16. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/mk/store/StoreTopicDao.java
  17. 1 0
      kmall-admin/src/main/java/com/kmall/admin/dao/vip/Mall2MemberPointsDao.java
  18. 95 0
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreTopicGoodsDto.java
  19. 28 0
      kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicHistoryPriceEntity.java
  20. 9 13
      kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicPriceEntity.java
  21. 3 0
      kmall-admin/src/main/java/com/kmall/admin/service/alarm/Mall2OrderingEarlyWarningRemindsService.java
  22. 5 0
      kmall-admin/src/main/java/com/kmall/admin/service/alarm/Mall2ShippingReminderAlarmService.java
  23. 212 78
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  24. 134 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2OrderingEarlyWarningRemindsServiceImpl.java
  25. 123 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2ShippingReminderAlarmServiceImpl.java
  26. 115 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/Mk2GoodsTopicPriceServiceImpl.java
  27. 4 0
      kmall-admin/src/main/java/com/kmall/admin/service/mk/Mk2GoodsTopicPriceService.java
  28. 45 0
      kmall-admin/src/main/java/com/kmall/admin/task/OrderRemindsTask.java
  29. 44 0
      kmall-admin/src/main/java/com/kmall/admin/task/ShippingRemindsTask.java
  30. 25 0
      kmall-admin/src/main/resources/XmlTemplate/StoreTopicDtoList.xml
  31. 26 0
      kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml
  32. 3 0
      kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml
  33. 79 1
      kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2OrderingEarlyWarningRemindsDao.xml
  34. 89 1
      kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2ShippingReminderAlarmDao.xml
  35. 58 2
      kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicHistoryPriceDao.xml
  36. 70 8
      kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicPriceDao.xml
  37. 1 1
      kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2MemberBirthdayDao.xml
  38. 25 8
      kmall-admin/src/main/resources/mybatis/mapper/mk/store/MkStorePromTypeDao.xml
  39. 22 0
      kmall-admin/src/main/resources/mybatis/mapper/mk/store/StoreTopicDao.xml
  40. 1 1
      kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2MemberConsumptionRecordsDao.xml
  41. 16 1
      kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2MemberPointsDao.xml
  42. 1 1
      kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml
  43. 8 0
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mk2goodstopicprice.html
  44. 3 22
      kmall-admin/src/main/webapp/WEB-INF/page/mk/storetopic.html
  45. 6 27
      kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2memberconsumptionrecords.html
  46. 4 28
      kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2memberpoints.html
  47. 9 7
      kmall-admin/src/main/webapp/js/alarm/mall2orderingearlywarningreminds.js
  48. 12 11
      kmall-admin/src/main/webapp/js/alarm/mall2shippingreminderalarm.js
  49. 6 11
      kmall-admin/src/main/webapp/js/mk/mk2goodstopichistoryprice.js
  50. 50 16
      kmall-admin/src/main/webapp/js/mk/mk2goodstopicprice.js
  51. 7 16
      kmall-admin/src/main/webapp/js/mk/storetopic.js
  52. 41 9
      kmall-admin/src/main/webapp/js/sale/sale.js
  53. 2 6
      kmall-admin/src/main/webapp/js/vip/mall2memberconsumptionrecords.js
  54. 2 6
      kmall-admin/src/main/webapp/js/vip/mall2memberpoints.js
  55. 2 6
      kmall-admin/src/main/webapp/js/vip/mall2pointsrules.js
  56. BIN
      kmall-admin/src/main/webapp/statics/file/store_topic_goods_export_yyyy_mm_dd_v1.0.0.xlsx
  57. 2 0
      kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java

@@ -662,6 +662,8 @@ public class OrderController {
         List<OrderEntity> orderList = orderService.queryOffilineOrderList(query);
         int total = orderService.queryTotal(query);
 
+        // 遍历循环订单是哪个店员销售的,根据订单号查询
+
         PageUtils pageUtil = new PageUtils(orderList, total, query.getLimit(), query.getPage());
 
         return R.ok().put("page", pageUtil);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/alarm/Mall2OrderingEarlyWarningRemindsController.java

@@ -31,7 +31,7 @@ public class Mall2OrderingEarlyWarningRemindsController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mall2orderingearlywarningreminds:list")
+//    @RequiresPermissions("mall2orderingearlywarningreminds:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mall2OrderingEarlyWarningRemindsController {
      * 查看信息
      */
     @RequestMapping("/info/{moewrId}")
-    @RequiresPermissions("mall2orderingearlywarningreminds:info")
+//    @RequiresPermissions("mall2orderingearlywarningreminds:info")
     @ResponseBody
     public R info(@PathVariable("moewrId") Integer moewrId) {
         Mall2OrderingEarlyWarningRemindsEntity mall2OrderingEarlyWarningReminds = mall2OrderingEarlyWarningRemindsService.queryObject(moewrId);
@@ -61,7 +61,7 @@ public class Mall2OrderingEarlyWarningRemindsController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mall2orderingearlywarningreminds:save")
+//    @RequiresPermissions("mall2orderingearlywarningreminds:save")
     @ResponseBody
     public R save(@RequestBody Mall2OrderingEarlyWarningRemindsEntity mall2OrderingEarlyWarningReminds) {
         mall2OrderingEarlyWarningRemindsService.save(mall2OrderingEarlyWarningReminds);
@@ -73,7 +73,7 @@ public class Mall2OrderingEarlyWarningRemindsController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mall2orderingearlywarningreminds:update")
+//    @RequiresPermissions("mall2orderingearlywarningreminds:update")
     @ResponseBody
     public R update(@RequestBody Mall2OrderingEarlyWarningRemindsEntity mall2OrderingEarlyWarningReminds) {
         mall2OrderingEarlyWarningRemindsService.update(mall2OrderingEarlyWarningReminds);
@@ -85,7 +85,7 @@ public class Mall2OrderingEarlyWarningRemindsController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mall2orderingearlywarningreminds:delete")
+//    @RequiresPermissions("mall2orderingearlywarningreminds:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]moewrIds) {
         mall2OrderingEarlyWarningRemindsService.deleteBatch(moewrIds);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/alarm/Mall2ShippingReminderAlarmController.java

@@ -31,7 +31,7 @@ public class Mall2ShippingReminderAlarmController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mall2shippingreminderalarm:list")
+//    @RequiresPermissions("mall2shippingreminderalarm:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mall2ShippingReminderAlarmController {
      * 查看信息
      */
     @RequestMapping("/info/{msraId}")
-    @RequiresPermissions("mall2shippingreminderalarm:info")
+//    @RequiresPermissions("mall2shippingreminderalarm:info")
     @ResponseBody
     public R info(@PathVariable("msraId") Integer msraId) {
         Mall2ShippingReminderAlarmEntity mall2ShippingReminderAlarm = mall2ShippingReminderAlarmService.queryObject(msraId);
@@ -61,7 +61,7 @@ public class Mall2ShippingReminderAlarmController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mall2shippingreminderalarm:save")
+//    @RequiresPermissions("mall2shippingreminderalarm:save")
     @ResponseBody
     public R save(@RequestBody Mall2ShippingReminderAlarmEntity mall2ShippingReminderAlarm) {
         mall2ShippingReminderAlarmService.save(mall2ShippingReminderAlarm);
@@ -73,7 +73,7 @@ public class Mall2ShippingReminderAlarmController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mall2shippingreminderalarm:update")
+//    @RequiresPermissions("mall2shippingreminderalarm:update")
     @ResponseBody
     public R update(@RequestBody Mall2ShippingReminderAlarmEntity mall2ShippingReminderAlarm) {
         mall2ShippingReminderAlarmService.update(mall2ShippingReminderAlarm);
@@ -85,7 +85,7 @@ public class Mall2ShippingReminderAlarmController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mall2shippingreminderalarm:delete")
+//    @RequiresPermissions("mall2shippingreminderalarm:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]msraIds) {
         mall2ShippingReminderAlarmService.deleteBatch(msraIds);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2GoodsTopicHistoryPriceController.java

@@ -31,7 +31,7 @@ public class Mk2GoodsTopicHistoryPriceController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mk2goodstopichistoryprice:list")
+//    @RequiresPermissions("mk2goodstopichistoryprice:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mk2GoodsTopicHistoryPriceController {
      * 查看信息
      */
     @RequestMapping("/info/{mgthpId}")
-    @RequiresPermissions("mk2goodstopichistoryprice:info")
+//    @RequiresPermissions("mk2goodstopichistoryprice:info")
     @ResponseBody
     public R info(@PathVariable("mgthpId") Integer mgthpId) {
         Mk2GoodsTopicHistoryPriceEntity mk2GoodsTopicHistoryPrice = mk2GoodsTopicHistoryPriceService.queryObject(mgthpId);
@@ -61,7 +61,7 @@ public class Mk2GoodsTopicHistoryPriceController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mk2goodstopichistoryprice:save")
+//    @RequiresPermissions("mk2goodstopichistoryprice:save")
     @ResponseBody
     public R save(@RequestBody Mk2GoodsTopicHistoryPriceEntity mk2GoodsTopicHistoryPrice) {
         mk2GoodsTopicHistoryPriceService.save(mk2GoodsTopicHistoryPrice);
@@ -73,7 +73,7 @@ public class Mk2GoodsTopicHistoryPriceController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mk2goodstopichistoryprice:update")
+//    @RequiresPermissions("mk2goodstopichistoryprice:update")
     @ResponseBody
     public R update(@RequestBody Mk2GoodsTopicHistoryPriceEntity mk2GoodsTopicHistoryPrice) {
         mk2GoodsTopicHistoryPriceService.update(mk2GoodsTopicHistoryPrice);
@@ -85,7 +85,7 @@ public class Mk2GoodsTopicHistoryPriceController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mk2goodstopichistoryprice:delete")
+//    @RequiresPermissions("mk2goodstopichistoryprice:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mgthpIds) {
         mk2GoodsTopicHistoryPriceService.deleteBatch(mgthpIds);

+ 43 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2GoodsTopicPriceController.java

@@ -1,12 +1,19 @@
 package com.kmall.admin.controller.mk;
 
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.kmall.admin.dto.StoreGoodsDto;
+import com.kmall.admin.dto.StoreTopicGoodsDto;
 import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
+import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.PageUtils;
 import com.kmall.common.utils.Query;
 import com.kmall.common.utils.R;
+import com.kmall.common.utils.excel.ExcelUtil;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -14,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
 
 import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
 import com.kmall.admin.service.mk.Mk2GoodsTopicPriceService;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 商品活动价格表Controller
@@ -27,12 +35,14 @@ import com.kmall.admin.service.mk.Mk2GoodsTopicPriceService;
 public class Mk2GoodsTopicPriceController {
     @Autowired
     private Mk2GoodsTopicPriceService mk2GoodsTopicPriceService;
+    @Autowired
+    private ExcelUtil excelUtil;
 
     /**
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mk2goodstopicprice:list")
+//    @RequiresPermissions("mk2goodstopicprice:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -50,7 +60,7 @@ public class Mk2GoodsTopicPriceController {
      * 查看信息
      */
     @RequestMapping("/info/{mgthpId}")
-    @RequiresPermissions("mk2goodstopicprice:info")
+//    @RequiresPermissions("mk2goodstopicprice:info")
     @ResponseBody
     public R info(@PathVariable("mgthpId") Integer mgthpId) {
         Mk2GoodsTopicPriceEntity mk2GoodsTopicPrice = mk2GoodsTopicPriceService.queryObject(mgthpId);
@@ -62,7 +72,7 @@ public class Mk2GoodsTopicPriceController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mk2goodstopicprice:save")
+//    @RequiresPermissions("mk2goodstopicprice:save")
     @ResponseBody
     public R save(@RequestBody Mk2GoodsTopicPriceEntity mk2GoodsTopicPrice) {
         mk2GoodsTopicPriceService.save(mk2GoodsTopicPrice);
@@ -74,7 +84,7 @@ public class Mk2GoodsTopicPriceController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mk2goodstopicprice:update")
+//    @RequiresPermissions("mk2goodstopicprice:update")
     @ResponseBody
     public R update(@RequestBody Mk2GoodsTopicPriceEntity mk2GoodsTopicPrice) {
         mk2GoodsTopicPriceService.update(mk2GoodsTopicPrice);
@@ -86,7 +96,7 @@ public class Mk2GoodsTopicPriceController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mk2goodstopicprice:delete")
+//    @RequiresPermissions("mk2goodstopicprice:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mgthpIds) {
         mk2GoodsTopicPriceService.deleteBatch(mgthpIds);
@@ -105,4 +115,32 @@ public class Mk2GoodsTopicPriceController {
 
         return R.ok().put("list", list);
     }
+
+
+    @PostMapping("/goodsTopicPriceUpload")
+    @ResponseBody
+    public R storeUpload(@RequestParam("file") MultipartFile file) {
+        List<StoreTopicGoodsDto> storeTopicGoodsDtoList = new ArrayList<>();//信息
+        try {
+            StoreTopicGoodsDto storeTopicGoodsDto = new StoreTopicGoodsDto();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("storeTopicGoodsDto", storeTopicGoodsDto);
+            beans.put("storeTopicGoodsDtoList", storeTopicGoodsDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.STORE_TOPIC_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        try {
+            mk2GoodsTopicPriceService.uploadExcel(storeTopicGoodsDtoList);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        //上传文件
+        return R.ok("导入成功!");
+    }
 }

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/mk/Mk2MemberBirthdayController.java

@@ -31,7 +31,7 @@ public class Mk2MemberBirthdayController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mk2memberbirthday:list")
+//    @RequiresPermissions("mk2memberbirthday:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mk2MemberBirthdayController {
      * 查看信息
      */
     @RequestMapping("/info/{mmbId}")
-    @RequiresPermissions("mk2memberbirthday:info")
+//    @RequiresPermissions("mk2memberbirthday:info")
     @ResponseBody
     public R info(@PathVariable("mmbId") Integer mmbId) {
         Mk2MemberBirthdayEntity mk2MemberBirthday = mk2MemberBirthdayService.queryObject(mmbId);
@@ -61,7 +61,7 @@ public class Mk2MemberBirthdayController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mk2memberbirthday:save")
+//    @RequiresPermissions("mk2memberbirthday:save")
     @ResponseBody
     public R save(@RequestBody Mk2MemberBirthdayEntity mk2MemberBirthday) {
         mk2MemberBirthdayService.save(mk2MemberBirthday);
@@ -73,7 +73,7 @@ public class Mk2MemberBirthdayController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mk2memberbirthday:update")
+//    @RequiresPermissions("mk2memberbirthday:update")
     @ResponseBody
     public R update(@RequestBody Mk2MemberBirthdayEntity mk2MemberBirthday) {
         mk2MemberBirthdayService.update(mk2MemberBirthday);
@@ -85,7 +85,7 @@ public class Mk2MemberBirthdayController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mk2memberbirthday:delete")
+//    @RequiresPermissions("mk2memberbirthday:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mmbIds) {
         mk2MemberBirthdayService.deleteBatch(mmbIds);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/mk/store/StoreTopicController.java

@@ -31,7 +31,7 @@ public class StoreTopicController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("storetopic:list")
+//    @RequiresPermissions("storetopic:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
@@ -51,7 +51,7 @@ public class StoreTopicController {
      * 查看信息
      */
     @RequestMapping("/info/{id}")
-    @RequiresPermissions("storetopic:info")
+//    @RequiresPermissions("storetopic:info")
     @ResponseBody
     public R info(@PathVariable("id") Integer id) {
         StoreTopicEntity storeTopic = storeTopicService.queryObject(id);
@@ -63,7 +63,7 @@ public class StoreTopicController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("storetopic:save")
+//    @RequiresPermissions("storetopic:save")
     @ResponseBody
     public R save(@RequestBody StoreTopicEntity storeTopic) {
         storeTopicService.save(storeTopic);
@@ -75,7 +75,7 @@ public class StoreTopicController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("storetopic:update")
+//    @RequiresPermissions("storetopic:update")
     @ResponseBody
     public R update(@RequestBody StoreTopicEntity storeTopic) {
         storeTopicService.update(storeTopic);
@@ -87,7 +87,7 @@ public class StoreTopicController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("storetopic:delete")
+//    @RequiresPermissions("storetopic:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]ids) {
         storeTopicService.deleteBatch(ids);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2MemberConsumptionRecordsController.java

@@ -31,7 +31,7 @@ public class Mall2MemberConsumptionRecordsController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mall2memberconsumptionrecords:list")
+//    @RequiresPermissions("mall2memberconsumptionrecords:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mall2MemberConsumptionRecordsController {
      * 查看信息
      */
     @RequestMapping("/info/{mmcrId}")
-    @RequiresPermissions("mall2memberconsumptionrecords:info")
+//    @RequiresPermissions("mall2memberconsumptionrecords:info")
     @ResponseBody
     public R info(@PathVariable("mmcrId") Integer mmcrId) {
         Mall2MemberConsumptionRecordsEntity mall2MemberConsumptionRecords = mall2MemberConsumptionRecordsService.queryObject(mmcrId);
@@ -61,7 +61,7 @@ public class Mall2MemberConsumptionRecordsController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mall2memberconsumptionrecords:save")
+//    @RequiresPermissions("mall2memberconsumptionrecords:save")
     @ResponseBody
     public R save(@RequestBody Mall2MemberConsumptionRecordsEntity mall2MemberConsumptionRecords) {
         mall2MemberConsumptionRecordsService.save(mall2MemberConsumptionRecords);
@@ -73,7 +73,7 @@ public class Mall2MemberConsumptionRecordsController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mall2memberconsumptionrecords:update")
+//    @RequiresPermissions("mall2memberconsumptionrecords:update")
     @ResponseBody
     public R update(@RequestBody Mall2MemberConsumptionRecordsEntity mall2MemberConsumptionRecords) {
         mall2MemberConsumptionRecordsService.update(mall2MemberConsumptionRecords);
@@ -85,7 +85,7 @@ public class Mall2MemberConsumptionRecordsController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mall2memberconsumptionrecords:delete")
+//    @RequiresPermissions("mall2memberconsumptionrecords:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mmcrIds) {
         mall2MemberConsumptionRecordsService.deleteBatch(mmcrIds);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2MemberPointsController.java

@@ -31,7 +31,7 @@ public class Mall2MemberPointsController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mall2memberpoints:list")
+//    @RequiresPermissions("mall2memberpoints:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mall2MemberPointsController {
      * 查看信息
      */
     @RequestMapping("/info/{mmpId}")
-    @RequiresPermissions("mall2memberpoints:info")
+//    @RequiresPermissions("mall2memberpoints:info")
     @ResponseBody
     public R info(@PathVariable("mmpId") Integer mmpId) {
         Mall2MemberPointsEntity mall2MemberPoints = mall2MemberPointsService.queryObject(mmpId);
@@ -61,7 +61,7 @@ public class Mall2MemberPointsController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mall2memberpoints:save")
+//    @RequiresPermissions("mall2memberpoints:save")
     @ResponseBody
     public R save(@RequestBody Mall2MemberPointsEntity mall2MemberPoints) {
         mall2MemberPointsService.save(mall2MemberPoints);
@@ -73,7 +73,7 @@ public class Mall2MemberPointsController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mall2memberpoints:update")
+//    @RequiresPermissions("mall2memberpoints:update")
     @ResponseBody
     public R update(@RequestBody Mall2MemberPointsEntity mall2MemberPoints) {
         mall2MemberPointsService.update(mall2MemberPoints);
@@ -85,7 +85,7 @@ public class Mall2MemberPointsController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mall2memberpoints:delete")
+//    @RequiresPermissions("mall2memberpoints:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mmpIds) {
         mall2MemberPointsService.deleteBatch(mmpIds);

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2PointsRulesController.java

@@ -31,7 +31,7 @@ public class Mall2PointsRulesController {
      * 查看列表
      */
     @RequestMapping("/list")
-    @RequiresPermissions("mall2pointsrules:list")
+//    @RequiresPermissions("mall2pointsrules:list")
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         //查询列表数据
@@ -49,7 +49,7 @@ public class Mall2PointsRulesController {
      * 查看信息
      */
     @RequestMapping("/info/{mprId}")
-    @RequiresPermissions("mall2pointsrules:info")
+//    @RequiresPermissions("mall2pointsrules:info")
     @ResponseBody
     public R info(@PathVariable("mprId") Integer mprId) {
         Mall2PointsRulesEntity mall2PointsRules = mall2PointsRulesService.queryObject(mprId);
@@ -61,7 +61,7 @@ public class Mall2PointsRulesController {
      * 保存
      */
     @RequestMapping("/save")
-    @RequiresPermissions("mall2pointsrules:save")
+//    @RequiresPermissions("mall2pointsrules:save")
     @ResponseBody
     public R save(@RequestBody Mall2PointsRulesEntity mall2PointsRules) {
         mall2PointsRulesService.save(mall2PointsRules);
@@ -73,7 +73,7 @@ public class Mall2PointsRulesController {
      * 修改
      */
     @RequestMapping("/update")
-    @RequiresPermissions("mall2pointsrules:update")
+//    @RequiresPermissions("mall2pointsrules:update")
     @ResponseBody
     public R update(@RequestBody Mall2PointsRulesEntity mall2PointsRules) {
         mall2PointsRulesService.update(mall2PointsRules);
@@ -85,7 +85,7 @@ public class Mall2PointsRulesController {
      * 删除
      */
     @RequestMapping("/delete")
-    @RequiresPermissions("mall2pointsrules:delete")
+//    @RequiresPermissions("mall2pointsrules:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mprIds) {
         mall2PointsRulesService.deleteBatch(mprIds);

+ 7 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/ProductStoreRelaDao.java

@@ -69,4 +69,11 @@ public interface ProductStoreRelaDao extends BaseDao<ProductStoreRelaEntity> {
      * @param productStoreRelaEntity
      */
     void updateStockNumByGoodsId(ProductStoreRelaEntity productStoreRelaEntity);
+
+    /**
+     * 根据门店id查询商品
+     * @param id
+     * @return
+     */
+    List<ProductStoreRelaEntity> queryByStoreId(Long id);
 }

+ 8 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/alarm/Mall2OrderingEarlyWarningRemindsDao.java

@@ -3,6 +3,8 @@ package com.kmall.admin.dao.alarm;
 import com.kmall.admin.entity.alarm.Mall2OrderingEarlyWarningRemindsEntity;
 import com.kmall.manager.dao.BaseDao;
 
+import java.util.List;
+
 /**
  * 订货提醒预警表Dao
  *
@@ -12,4 +14,10 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface Mall2OrderingEarlyWarningRemindsDao extends BaseDao<Mall2OrderingEarlyWarningRemindsEntity> {
 
+
+    void insertBatch(List<Mall2OrderingEarlyWarningRemindsEntity> insertRemiderList);
+
+    void updateBatch(List<Mall2OrderingEarlyWarningRemindsEntity> updateRemiderList);
+
+    Mall2OrderingEarlyWarningRemindsEntity queryByGoodsId(Long goodsId);
 }

+ 13 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/alarm/Mall2ShippingReminderAlarmDao.java

@@ -2,6 +2,9 @@ package com.kmall.admin.dao.alarm;
 
 import com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity;
 import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 出货提醒预警表Dao
@@ -12,4 +15,14 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface Mall2ShippingReminderAlarmDao extends BaseDao<Mall2ShippingReminderAlarmEntity> {
 
+    /**
+     * 根据商品id查询出货提醒表
+     * @param goodsId
+     * @return
+     */
+    Mall2ShippingReminderAlarmEntity queryByGoodsIdAndStoreId(@Param("goodsId") Long goodsId, @Param("storeId") Long storeId);
+
+    void insertBatch(List<Mall2ShippingReminderAlarmEntity> insertRemiderList);
+
+    void updateBatch(List<Mall2ShippingReminderAlarmEntity> updateRemiderList);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/mk/Mk2GoodsTopicPriceDao.java

@@ -2,6 +2,7 @@ package com.kmall.admin.dao.mk;
 
 import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
 import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 商品活动价格表Dao
@@ -12,4 +13,5 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface Mk2GoodsTopicPriceDao extends BaseDao<Mk2GoodsTopicPriceEntity> {
 
+    Mk2GoodsTopicPriceEntity queryByTopicIdAndGoodsId(@Param("mgthpId") Integer mgthpId, @Param("sku") String  sku);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/mk/store/MkStorePromTypeDao.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.dao.mk.store;
 
+import com.kmall.admin.entity.mk.store.MkStorePromEntity;
 import com.kmall.admin.entity.mk.store.MkStorePromTypeEntity;
 import com.kmall.manager.dao.BaseDao;
 
@@ -12,4 +13,5 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface MkStorePromTypeDao extends BaseDao<MkStorePromTypeEntity> {
 
+    MkStorePromTypeEntity queryByName(String promTypeName);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/mk/store/StoreTopicDao.java

@@ -2,6 +2,7 @@ package com.kmall.admin.dao.mk.store;
 
 import com.kmall.admin.entity.mk.store.StoreTopicEntity;
 import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 门店活动表Dao
@@ -12,4 +13,5 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface StoreTopicDao extends BaseDao<StoreTopicEntity> {
 
+    StoreTopicEntity queryByStoreIdAndType(@Param("storeId") Integer storeId, @Param("promTypeId") Integer promTypeId);
 }

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/vip/Mall2MemberPointsDao.java

@@ -12,4 +12,5 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface Mall2MemberPointsDao extends BaseDao<Mall2MemberPointsEntity> {
 
+    Mall2MemberPointsEntity queryByUserId(Integer userId);
 }

+ 95 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/StoreTopicGoodsDto.java

@@ -0,0 +1,95 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ * @date 2019-10-18 10:41:08
+ */
+public class StoreTopicGoodsDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private String topic;
+    private String topicName;
+    private String topicContent;
+    private String topicGoodsSku;
+    private String topicGoodsPrice;
+    private String topicBeginTime;
+    private String topicEndTime;
+    private String merchSn;
+    private String shopSn;
+
+    public String getTopic() {
+        return topic;
+    }
+
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
+
+    public String getTopicName() {
+        return topicName;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public String getTopicContent() {
+        return topicContent;
+    }
+
+    public void setTopicContent(String topicContent) {
+        this.topicContent = topicContent;
+    }
+
+    public String getTopicGoodsSku() {
+        return topicGoodsSku;
+    }
+
+    public void setTopicGoodsSku(String topicGoodsSku) {
+        this.topicGoodsSku = topicGoodsSku;
+    }
+
+    public String getTopicGoodsPrice() {
+        return topicGoodsPrice;
+    }
+
+    public void setTopicGoodsPrice(String topicGoodsPrice) {
+        this.topicGoodsPrice = topicGoodsPrice;
+    }
+
+    public String getTopicBeginTime() {
+        return topicBeginTime;
+    }
+
+    public void setTopicBeginTime(String topicBeginTime) {
+        this.topicBeginTime = topicBeginTime;
+    }
+
+    public String getTopicEndTime() {
+        return topicEndTime;
+    }
+
+    public void setTopicEndTime(String topicEndTime) {
+        this.topicEndTime = topicEndTime;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getShopSn() {
+        return shopSn;
+    }
+
+    public void setShopSn(String shopSn) {
+        this.shopSn = shopSn;
+    }
+}

+ 28 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicHistoryPriceEntity.java

@@ -39,6 +39,10 @@ public class Mk2GoodsTopicHistoryPriceEntity implements Serializable {
      * 活动内容
      */
     private String topicContent;
+
+    private Date topicBeginTime;
+    private Date topicEndTime;
+    private String topicGoodsSku;
     /**
      * 创建人编号
      */
@@ -203,4 +207,28 @@ public class Mk2GoodsTopicHistoryPriceEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public Date getTopicBeginTime() {
+        return topicBeginTime;
+    }
+
+    public void setTopicBeginTime(Date topicBeginTime) {
+        this.topicBeginTime = topicBeginTime;
+    }
+
+    public Date getTopicEndTime() {
+        return topicEndTime;
+    }
+
+    public void setTopicEndTime(Date topicEndTime) {
+        this.topicEndTime = topicEndTime;
+    }
+
+    public String getTopicGoodsSku() {
+        return topicGoodsSku;
+    }
+
+    public void setTopicGoodsSku(String topicGoodsSku) {
+        this.topicGoodsSku = topicGoodsSku;
+    }
 }

+ 9 - 13
kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicPriceEntity.java

@@ -42,7 +42,7 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
     /**
      * 活动产品
      */
-    private Integer topicGoodsId;
+    private String topicGoodsSku;
     /**
      * 活动开始时间
      */
@@ -154,20 +154,8 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
     public String getTopicContent() {
         return topicContent;
     }
-    /**
-     * 设置:活动产品
-     */
-    public void setTopicGoodsId(Integer topicGoodsId) {
-        this.topicGoodsId = topicGoodsId;
-    }
 
     /**
-     * 获取:活动产品
-     */
-    public Integer getTopicGoodsId() {
-        return topicGoodsId;
-    }
-    /**
      * 设置:活动开始时间
      */
     public void setTopicBeginTime(Date topicBeginTime) {
@@ -271,4 +259,12 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public String getTopicGoodsSku() {
+        return topicGoodsSku;
+    }
+
+    public void setTopicGoodsSku(String topicGoodsSku) {
+        this.topicGoodsSku = topicGoodsSku;
+    }
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/alarm/Mall2OrderingEarlyWarningRemindsService.java

@@ -69,4 +69,7 @@ public interface Mall2OrderingEarlyWarningRemindsService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] moewrIds);
+
+
+    void orderReminds();
 }

+ 5 - 0
kmall-admin/src/main/java/com/kmall/admin/service/alarm/Mall2ShippingReminderAlarmService.java

@@ -68,4 +68,9 @@ public interface Mall2ShippingReminderAlarmService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] msraIds);
+
+    /**
+     * 查询商品是否需要出货提醒
+     */
+    void shippingReminds();
 }

+ 212 - 78
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -4,15 +4,23 @@ import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.ImmutableBiMap;
 import com.google.common.collect.Maps;
 import com.kmall.admin.dao.*;
+import com.kmall.admin.dao.mk.Mk2GoodsTopicPriceDao;
+import com.kmall.admin.dao.mk.Mk2MemberBirthdayDao;
 import com.kmall.admin.dao.mk.store.MkStorePromOrderRealDao;
+import com.kmall.admin.dao.mk.store.MkStorePromTypeDao;
+import com.kmall.admin.dao.mk.store.StoreTopicDao;
+import com.kmall.admin.dao.vip.Mall2MemberConsumptionRecordsDao;
+import com.kmall.admin.dao.vip.Mall2MemberPointsDao;
+import com.kmall.admin.dao.vip.Mall2PointsRulesDao;
 import com.kmall.admin.dto.OrderExpressDto;
 import com.kmall.admin.dto.OrderRecognitionDto;
 import com.kmall.admin.entity.*;
 import com.kmall.admin.entity.OrderProcessRecordEntity;
-import com.kmall.admin.entity.mk.store.MkStoreCampMinusEntity;
-import com.kmall.admin.entity.mk.store.MkStoreCampMinusLevelEntity;
-import com.kmall.admin.entity.mk.store.MkStorePromOrderRealEntity;
-import com.kmall.admin.entity.mk.store.MkStoreTicketDiscountEntity;
+import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
+import com.kmall.admin.entity.mk.store.*;
+import com.kmall.admin.entity.vip.Mall2MemberConsumptionRecordsEntity;
+import com.kmall.admin.entity.vip.Mall2MemberPointsEntity;
+import com.kmall.admin.entity.vip.Mall2PointsRulesEntity;
 import com.kmall.admin.fromcomm.dao.SysConfigDao;
 import com.kmall.admin.service.*;
 import com.kmall.admin.service.mk.store.MkStoreCampMinusService;
@@ -118,8 +126,24 @@ public class OrderServiceImpl implements OrderService {
     @Autowired
     private MkStoreTicketDiscountService mkStoreTicketDiscountService;
 
-
-
+    @Autowired
+    private CashierDao cashierDao; // 收银机查询
+    @Autowired
+    private CashierLoginRecordDao cashierLoginRecordDao; // 收银员登录记录
+    @Autowired
+    private StoreTopicDao storeTopicDao; // 查询是否有门店活动
+    @Autowired
+    private Mk2GoodsTopicPriceDao mk2GoodsTopicPriceDao; // 门店商品价格
+    @Autowired
+    private Mall2PointsRulesDao pointsRulesDao; // 积分规则
+    @Autowired
+    private Mall2MemberPointsDao memberPointsDao; // 用户积分
+    @Autowired
+    private Mall2MemberConsumptionRecordsDao memberConsumptionRecordsDao; // 会员消费记录
+    @Autowired
+    private MkStorePromTypeDao storePromTypeDao; // 优惠类型
+    @Autowired
+    private Mk2MemberBirthdayDao memberBirthdayDao; // 生日优惠
 
     @Override
     public OrderEntity queryObject(Long id) {
@@ -1599,8 +1623,12 @@ public class OrderServiceImpl implements OrderService {
         String parCode = (String) param.get("payCode");
         // 解析sessionId(WebSocket) String
         String sessionId = (String) param.get("sessionId");
+        // machineCode
+        String machineCode = (String) param.get("machineCode");
 
         Map resultObj = Maps.newHashMap();
+
+
         try {
             if (user == null) {
                 resultObj.put("errno", 400);
@@ -1630,6 +1658,9 @@ public class OrderServiceImpl implements OrderService {
                     resultObj.put("errmsg", "订单提交失败:商品不存在");
                     return resultObj;
                 }
+
+
+
                 Integer sellVolume = (Integer)goodsDto.get("sellVolume");
 
                 goodsDto.put("goodsId",goodsEntity.getId());
@@ -1648,6 +1679,9 @@ public class OrderServiceImpl implements OrderService {
                         resultObj.put("errmsg", "库存不足,仅剩余" + productInfo.getStockNum());
                         return resultObj;
                     } else {
+
+                        // TODO 判断销售价是否低于底线价
+
                         productInfo.setStockNum(productInfo.getStockNum() - sellVolume);
                         productInfo.setStoreId(Long.valueOf(storeId));
                         productInfo.addSellVolume();
@@ -1658,6 +1692,7 @@ public class OrderServiceImpl implements OrderService {
                             goodsDao.update(goodsEntity);
                         }
                     }
+                    // 借用这个字段来存储购买数
                     goodsEntity.setGoodsNumber(sellVolume);
                     goodsEntities.add(goodsEntity);
                 }
@@ -1678,88 +1713,59 @@ public class OrderServiceImpl implements OrderService {
                 userDao.save(userEntity);
             }
 
-            // TODO 生成订单之前,先查询是否有优惠券或者满减
-            // TODO 20200610 要修改成全部商品
-            // 优惠券的集合
-            List<MkStoreTicketDiscountEntity> mkStoreTicketDiscountEntities = new ArrayList<>();
-            // 满减的集合
-            List<MkStoreCampMinusLevelEntity> mkStoreCampMinusEntities = new ArrayList<>();
-            // 存商品跟金额的关系
-            Map<Long,BigDecimal> moneyMap = new HashMap<>();
-            // 商品总价
-            BigDecimal totalPrice = new BigDecimal(0);
-
-            for(GoodsEntity goodsEntity : goodsEntities){
-                Long goodsId = goodsEntity.getId();
-                // 计算该商品的价格
-                BigDecimal goodsPrice = goodsEntity.getStoreRetailPrice().multiply(new BigDecimal(goodsEntity.getGoodsNumber())).setScale(2, RoundingMode.HALF_UP);
-                moneyMap.put(goodsId,goodsPrice);
-                totalPrice = totalPrice.add(goodsPrice);
-                // 查询该商品id是否有优惠券
-                List<MkStoreTicketDiscountEntity> mkStoreTicketDiscountEntity = mkStoreTicketDiscountService.queryByGoodsId(goodsId);
-                if(mkStoreTicketDiscountEntity != null) {
-                    mkStoreTicketDiscountEntities.addAll(mkStoreTicketDiscountEntity);
-                }
-                // 查询该商品id是否有满减
-                List<MkStoreCampMinusLevelEntity> mkStoreCampMinusEntity = mkStoreCampMinusService.queryByGoodsId(goodsId);
-                if(mkStoreCampMinusEntity != null) {
-                    mkStoreCampMinusEntities.addAll(mkStoreCampMinusEntity);
-                }
-            }
 
-            // 满减优惠的金额
-            BigDecimal campDisCountAmount = new BigDecimal(0);
-            if(mkStoreCampMinusEntities.size() > 0){
-                // 上一次所需金额,用于取最大的优惠力度
-                BigDecimal lastAmount = new BigDecimal(0);
-                for (int i = 0 ; i < mkStoreCampMinusEntities.size() ; i++){
-                    MkStoreCampMinusLevelEntity mkStoreCampMinusLevelEntity = mkStoreCampMinusEntities.get(i);
-                    // TODO 20200610还有满多少件,跟满多少元打折的,逻辑复杂,下次开发
-                    BigDecimal discCond = mkStoreCampMinusLevelEntity.getYuanMinusCond();
-                    // 判断这次金额是否大于上次金额,如果不大于,直接continue
-                    if(discCond.compareTo(lastAmount) > 0){
-                        // 如果总金额大于所需金额,则可以使用该优惠券,记录该优惠券的角标,金额跟优惠的钱
-                        if(totalPrice.compareTo(discCond) > 0){
-                            // 记录上一次金额
-                            lastAmount = discCond;
-                            campDisCountAmount = mkStoreCampMinusLevelEntity.getYuanMinusPref();
-                        }
+
+
+            // 优惠金额
+            BigDecimal disCountAmount = new BigDecimal(0);
+            // 活动id
+            Integer topicId = 0;
+            // 查询活动类别id
+            MkStorePromTypeEntity mkStorePromEntity = storePromTypeDao.queryByName("周活动");
+            // 根据门店id和活动类别查询该门店是否有活动
+            StoreTopicEntity storeTopic = storeTopicDao.queryByStoreIdAndType(storeId,mkStorePromEntity.getPromTypeId());
+            // 判断是否启用了活动,如果启用了活动。则去查询活动价
+            if(storeTopic != null){
+                for(GoodsEntity goodsEntity :goodsEntities){
+                    // 根据活动id跟商品id,查询该商品的价格
+                    Mk2GoodsTopicPriceEntity goodsTopicPriceEntity =
+                            mk2GoodsTopicPriceDao.queryByTopicIdAndGoodsId(storeTopic.getId(),goodsEntity.getSku());
+                    if (goodsEntity.getStoreRetailPrice().compareTo(goodsTopicPriceEntity.getTopicPrice()) <= -1) {
+                        LOGGER.error("销售价格小于活动价格");
+                        throw new RuntimeException("商品"+goodsEntity.getName()+"的销售价格小于活动价格");
                     }
+                    goodsEntity.setStoreRetailPrice(goodsTopicPriceEntity.getTopicPrice());
                 }
+
+            }else{
+                disCountAmount = getDisCountAmout(goodsEntities);
             }
 
-            // 优惠券优惠的金额
-            BigDecimal ticketDisCountAmount = new BigDecimal(0);
-            if(mkStoreTicketDiscountEntities.size() > 0){
-                // 上一次所需金额,用于取最大的优惠力度
-                BigDecimal lastAmount = new BigDecimal(0);
-                for (int i = 0 ; i < mkStoreTicketDiscountEntities.size() ; i++){
-                    MkStoreTicketDiscountEntity mkStoreTicketDiscountEntity = mkStoreTicketDiscountEntities.get(i);
-                    // 代金券所需金额
-                    // TODO 20200610还有折扣券的,逻辑较为复杂,下次在开发
-                    BigDecimal discCond = mkStoreTicketDiscountEntity.getVoucherCond();
-
-                    // 判断这次金额是否大于上次金额,如果不大于,直接continue
-                    if(discCond.compareTo(lastAmount) > 0){
-                        // 如果总金额大于所需金额,则可以使用该优惠券,记录该优惠券的角标,金额跟优惠的钱
-                        if(totalPrice.compareTo(discCond) > 0){
-                            // 记录上一次金额
-                            lastAmount = discCond;
-                            ticketDisCountAmount = mkStoreTicketDiscountEntity.getVoucherMoney();
-                        }
-                    }
-                }
+
+            // 判断该用户是否是生日
+            Boolean isBirth = false;
+            String birthday = "";
+            if(userEntity.getIdNo().length() == 15){
+                birthday = userEntity.getIdNo().substring(8,10) + "-" + userEntity.getIdNo().substring(10,12);
+            }else if(userEntity.getIdNo().length() == 18){
+                birthday = userEntity.getIdNo().substring(10,12) + "-" + userEntity.getIdNo().substring(12,14);
             }
 
-            // 判断两个优惠金额
-            BigDecimal disCountAmount = ticketDisCountAmount.compareTo(campDisCountAmount) > 0 ? ticketDisCountAmount : campDisCountAmount;
+            SimpleDateFormat format = new SimpleDateFormat("MM-dd");
+            String today = format.format(new Date());
+            if(birthday.equalsIgnoreCase(today)){
+                isBirth = true;
+            }
 
 
 
             // 生成订单
             String merchOrderSn = "EMATO" + CommonUtil.generateOrderNumber();
-            OrderVo order = setOrderVo(goodsList, userEntity,storeId.longValue(), user.getMerchSn(),disCountAmount);
+            OrderVo order = setOrderVo(goodsEntities, userEntity,storeId.longValue(), user.getMerchSn(),disCountAmount);
             order.setStore_id(storeId.longValue());
+            if(storeTopic != null){
+                order.setActivity_id(storeTopic.getId().longValue());
+            }
             order.setMerchOrderSn(merchOrderSn);
 
             //插入订单信息和订单商品
@@ -1821,6 +1827,54 @@ public class OrderServiceImpl implements OrderService {
             pickUpCodeEntity.setOrderSn(order.getOrder_sn());
             pickUpCodeService.save(pickUpCodeEntity);
 
+            // 生成销售记录
+            SaleRecordEntity saleRecordEntity = new SaleRecordEntity();
+
+            // 根据收银机机器码,查询收银机
+            CashierEntity cashierEntity = cashierDao.queryByMachineCode(machineCode);
+            if(cashierEntity != null){
+                saleRecordEntity.setCashierSn(cashierEntity.getCashierSn());
+                saleRecordEntity.setOrderSn(order.getOrder_sn());
+                saleRecordEntity.setSallerId(userId+"");
+                saleRecordEntity.setSalesTime(new Date());
+                saleRecordEntity.setDiscountId(topicId + "");
+
+            }
+
+            // 查询积分规则 ,默认先按消费金额1:1积分
+            Mall2PointsRulesEntity pointsRules = null;
+
+            // 增加该会员的积分
+            Mall2MemberPointsEntity memberPointsEntity = memberPointsDao.queryByUserId(userEntity.getId());
+            if(memberPointsEntity == null){
+                memberPointsEntity = new Mall2MemberPointsEntity();
+                memberPointsEntity.setUserId(userEntity.getId()+"");
+                memberPointsEntity.setPoints(order.getActual_price().intValue());
+                memberPointsEntity.setCreaterSn(userId+"");
+                memberPointsEntity.setCreateTime(new Date());
+                memberPointsDao.save(memberPointsEntity);
+            }else{
+                memberPointsEntity.setPoints(order.getActual_price().add(new BigDecimal(memberPointsEntity.getPoints())).intValue());
+                memberPointsEntity.setModerSn(userId+"");
+                memberPointsEntity.setModTime(new Date());
+                memberPointsDao.update(memberPointsEntity);
+            }
+            // 增加该会员的消费记录
+            Mall2MemberConsumptionRecordsEntity consumptionRecords = new Mall2MemberConsumptionRecordsEntity();
+            consumptionRecords.setUserId(userEntity.getId()+"");
+            consumptionRecords.setOrderSn(order.getOrder_sn());
+            consumptionRecords.setConsumptionTime(new Date());
+            consumptionRecords.setShopSn(storeId+"");
+            // TODO 判断是否有使用生日优惠
+            if(isBirth){
+                consumptionRecords.setIsUseBirthdayOffer("0"); // 使用生日优惠
+            }else{
+                consumptionRecords.setIsUseBirthdayOffer("1"); // 没使用生日优惠
+            }
+            consumptionRecords.setCreaterSn(userId+"");
+            consumptionRecords.setCreateTime(new Date());
+            memberConsumptionRecordsDao.save(consumptionRecords);
+
             resultObj.put("code",pickUpCodeEntity.getPickUpCodeSn()); // 系统中累加
 
             resultObj.put("time",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
@@ -1842,6 +1896,86 @@ public class OrderServiceImpl implements OrderService {
         return resultObj;
     }
 
+    private BigDecimal getDisCountAmout(List<GoodsEntity> goodsEntities) {
+        BigDecimal disCountAmount;
+        // TODO 生成订单之前,先查询是否有优惠券或者满减
+        // TODO 20200610 要修改成全部商品
+        // 优惠券的集合
+        List<MkStoreTicketDiscountEntity> mkStoreTicketDiscountEntities = new ArrayList<>();
+        // 满减的集合
+        List<MkStoreCampMinusLevelEntity> mkStoreCampMinusEntities = new ArrayList<>();
+        // 存商品跟金额的关系
+        Map<Long,BigDecimal> moneyMap = new HashMap<>();
+        // 商品总价
+        BigDecimal totalPrice = new BigDecimal(0);
+
+        for(GoodsEntity goodsEntity : goodsEntities){
+            Long goodsId = goodsEntity.getId();
+            // 计算该商品的价格
+            BigDecimal goodsPrice = goodsEntity.getStoreRetailPrice().multiply(new BigDecimal(goodsEntity.getGoodsNumber())).setScale(2, RoundingMode.HALF_UP);
+            moneyMap.put(goodsId,goodsPrice);
+            totalPrice = totalPrice.add(goodsPrice);
+            // 查询该商品id是否有优惠券
+            List<MkStoreTicketDiscountEntity> mkStoreTicketDiscountEntity = mkStoreTicketDiscountService.queryByGoodsId(goodsId);
+            if(mkStoreTicketDiscountEntity != null) {
+                mkStoreTicketDiscountEntities.addAll(mkStoreTicketDiscountEntity);
+            }
+            // 查询该商品id是否有满减
+            List<MkStoreCampMinusLevelEntity> mkStoreCampMinusEntity = mkStoreCampMinusService.queryByGoodsId(goodsId);
+            if(mkStoreCampMinusEntity != null) {
+                mkStoreCampMinusEntities.addAll(mkStoreCampMinusEntity);
+            }
+        }
+
+        // 满减优惠的金额
+        BigDecimal campDisCountAmount = new BigDecimal(0);
+        if(mkStoreCampMinusEntities.size() > 0){
+            // 上一次所需金额,用于取最大的优惠力度
+            BigDecimal lastAmount = new BigDecimal(0);
+            for (int i = 0 ; i < mkStoreCampMinusEntities.size() ; i++){
+                MkStoreCampMinusLevelEntity mkStoreCampMinusLevelEntity = mkStoreCampMinusEntities.get(i);
+                // TODO 20200610还有满多少件,跟满多少元打折的,逻辑复杂,下次开发
+                BigDecimal discCond = mkStoreCampMinusLevelEntity.getYuanMinusCond();
+                // 判断这次金额是否大于上次金额,如果不大于,直接continue
+                if(discCond.compareTo(lastAmount) > 0){
+                    // 如果总金额大于所需金额,则可以使用该优惠券,记录该优惠券的角标,金额跟优惠的钱
+                    if(totalPrice.compareTo(discCond) > 0){
+                        // 记录上一次金额
+                        lastAmount = discCond;
+                        campDisCountAmount = mkStoreCampMinusLevelEntity.getYuanMinusPref();
+                    }
+                }
+            }
+        }
+
+        // 优惠券优惠的金额
+        BigDecimal ticketDisCountAmount = new BigDecimal(0);
+        if(mkStoreTicketDiscountEntities.size() > 0){
+            // 上一次所需金额,用于取最大的优惠力度
+            BigDecimal lastAmount = new BigDecimal(0);
+            for (int i = 0 ; i < mkStoreTicketDiscountEntities.size() ; i++){
+                MkStoreTicketDiscountEntity mkStoreTicketDiscountEntity = mkStoreTicketDiscountEntities.get(i);
+                // 代金券所需金额
+                // TODO 20200610还有折扣券的,逻辑较为复杂,下次在开发
+                BigDecimal discCond = mkStoreTicketDiscountEntity.getVoucherCond();
+
+                // 判断这次金额是否大于上次金额,如果不大于,直接continue
+                if(discCond.compareTo(lastAmount) > 0){
+                    // 如果总金额大于所需金额,则可以使用该优惠券,记录该优惠券的角标,金额跟优惠的钱
+                    if(totalPrice.compareTo(discCond) > 0){
+                        // 记录上一次金额
+                        lastAmount = discCond;
+                        ticketDisCountAmount = mkStoreTicketDiscountEntity.getVoucherMoney();
+                    }
+                }
+            }
+        }
+
+
+        disCountAmount = ticketDisCountAmount.compareTo(campDisCountAmount) > 0 ? ticketDisCountAmount : campDisCountAmount;
+        return disCountAmount;
+    }
+
     private void AliPay(SysUserEntity user, String parCode,  OrderVo order, OrderProcessRecordEntity processRecordEntity, OrderWXPayRecordEntity orderWXPayRecordCurrent, StoreEntity store) throws Exception {
 
         AliPayRequestParams params = new AliPayRequestParams();
@@ -2069,15 +2203,15 @@ public class OrderServiceImpl implements OrderService {
      * 设置订单数据
      * @return
      */
-    public OrderVo setOrderVo(List<LinkedHashMap> goodsList, UserEntity loginUser,Long storeId, String merchSn, BigDecimal disCountAmount){
+    public OrderVo setOrderVo(List<GoodsEntity> goodsList, UserEntity loginUser,Long storeId, String merchSn, BigDecimal disCountAmount){
         OrderVo orderInfo = new OrderVo();
 
         BigDecimal goodsTotalPrice = new BigDecimal(0.00);
         BigDecimal freightPrice = Constant.ZERO;
-        for (LinkedHashMap goods : goodsList) {
+        for (GoodsEntity goodsEntity : goodsList) {
 
             goodsTotalPrice = goodsTotalPrice
-                    .add(new BigDecimal(goods.get("retailPrice").toString()).multiply(new BigDecimal(goods.get("sellVolume").toString())));
+                    .add(goodsEntity.getStoreRetailPrice().multiply(new BigDecimal(goodsEntity.getGoodsNumber())));
         }
 
         //订单价格计算:订单的总价+运费

+ 134 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2OrderingEarlyWarningRemindsServiceImpl.java

@@ -1,14 +1,24 @@
 package com.kmall.admin.service.impl.alarm;
 
+import com.kmall.admin.dao.GoodsDao;
+import com.kmall.admin.dao.MerchDao;
+import com.kmall.admin.dao.ProductStoreRelaDao;
+import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.entity.GoodsEntity;
+import com.kmall.admin.entity.MerchEntity;
+import com.kmall.admin.entity.ProductStoreRelaEntity;
+import com.kmall.admin.entity.StoreEntity;
+import com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.util.*;
 
 import com.kmall.admin.dao.alarm.Mall2OrderingEarlyWarningRemindsDao;
 import com.kmall.admin.entity.alarm.Mall2OrderingEarlyWarningRemindsEntity;
 import com.kmall.admin.service.alarm.Mall2OrderingEarlyWarningRemindsService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 订货提醒预警表Service实现类
@@ -22,6 +32,15 @@ public class Mall2OrderingEarlyWarningRemindsServiceImpl implements Mall2Orderin
     @Autowired
     private Mall2OrderingEarlyWarningRemindsDao mall2OrderingEarlyWarningRemindsDao;
 
+    @Autowired
+    private MerchDao merchDao; // 商户
+    @Autowired
+    private StoreDao storeDao; // 门店
+    @Autowired
+    private ProductStoreRelaDao productStoreRelaDao ; // 门店商品
+    @Autowired
+    private GoodsDao goodsDao; // 商品
+
     @Override
     public Mall2OrderingEarlyWarningRemindsEntity queryObject(Integer moewrId) {
         return mall2OrderingEarlyWarningRemindsDao.queryObject(moewrId);
@@ -56,4 +75,117 @@ public class Mall2OrderingEarlyWarningRemindsServiceImpl implements Mall2Orderin
     public int deleteBatch(Integer[]moewrIds) {
         return mall2OrderingEarlyWarningRemindsDao.deleteBatch(moewrIds);
     }
+
+    @Override
+    @Transactional
+    public void orderReminds() {
+        // 查询所有商户
+        List<MerchEntity> merchEntities = merchDao.queryList(new HashMap<String, Object>());
+
+
+        // 遍历商户集合,查询商户下所有的门店
+        for(MerchEntity merchEntity : merchEntities) {
+            String merchSn = merchEntity.getMerchSn();
+            Map<String,Object> goodsParam = new HashMap<>();
+            goodsParam.put("merchSn", merchSn);
+            // 查询该商户下所有商品
+            List<GoodsEntity> goodsEntities = goodsDao.queryList(goodsParam);
+            if(goodsEntities == null ||goodsEntities.size() == 0){
+                continue;
+            }
+            goodsParam = null;
+
+
+            // 需要新增的记录集合
+            List<Mall2OrderingEarlyWarningRemindsEntity> insertRemiderList = new ArrayList<>();
+            // 需要更新的记录集合
+            List<Mall2OrderingEarlyWarningRemindsEntity> updateRemiderList = new ArrayList<>();
+
+            // 遍历商户集合,根据sku跟商户编号所有门店商品
+            for(GoodsEntity goodsEntity : goodsEntities) {
+                String goodsSn = goodsEntity.getGoodsSn();
+                Map<String,Object> storeRelaParam = new HashMap<>();
+                storeRelaParam.put("goodsSn",goodsSn);
+                storeRelaParam.put("merchSn",merchSn);
+                List<ProductStoreRelaEntity> productStoreRelaEntities = productStoreRelaDao.queryList(storeRelaParam);
+                if(productStoreRelaEntities == null || productStoreRelaEntities.size() == 0 ){
+                    continue;
+                }
+                storeRelaParam = null;
+
+                // 获取商品库存
+                Integer goodsNumber = goodsEntity.getGoodsNumber();
+
+                // 总库存
+                Integer totalNum = goodsNumber ;
+                // 总平均销售量
+                Integer totalSellVolumn = 0;
+
+                // 遍历商品集合,计算商品的平均库存
+                for(ProductStoreRelaEntity productStoreRelaEntity : productStoreRelaEntities){
+                    // 商品id
+                    Long goodsId = productStoreRelaEntity.getGoodsId();
+                    // 该商品的销售量
+                    Integer sellVolume = productStoreRelaEntity.getSellVolume();
+                    // 获取当前时间
+                    Date date = new Date();
+                    // 获取该商品的创建时间
+                    Date createTime = productStoreRelaEntity.getCreateTime();
+                    // 相差的天数
+                    int days = (int) ((date.getTime() - createTime.getTime()) / (1000*3600*24));
+                    days = days == 0? 1 : days;
+                    // 一周平均销售量
+                    Integer avaerageSellVolume = new BigDecimal(sellVolume).divide(new BigDecimal(days),2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(7))
+                            .setScale(0, BigDecimal.ROUND_HALF_UP).intValue();
+                    totalSellVolumn += avaerageSellVolume;
+                    // 该商品的库存
+                    Integer stockNum = productStoreRelaEntity.getStockNum();
+                    totalNum += stockNum;
+                }
+
+                if(totalNum <= totalSellVolumn){
+                    Mall2OrderingEarlyWarningRemindsEntity orderingEarlyWarningRemindsEntity = mall2OrderingEarlyWarningRemindsDao.queryByGoodsId(goodsEntity.getId());
+                    if(orderingEarlyWarningRemindsEntity == null){
+                        orderingEarlyWarningRemindsEntity = new Mall2OrderingEarlyWarningRemindsEntity();
+                        orderingEarlyWarningRemindsEntity.setAverageSales(new BigDecimal(totalSellVolumn));
+                        orderingEarlyWarningRemindsEntity.setTotalNum(totalNum);
+                        orderingEarlyWarningRemindsEntity.setGoodsId(goodsEntity.getId().intValue());
+                        orderingEarlyWarningRemindsEntity.setGoodsName(goodsEntity.getName());
+                        orderingEarlyWarningRemindsEntity.setAlarmType("00");
+                        orderingEarlyWarningRemindsEntity.setAlarmTime(new Date());
+                        orderingEarlyWarningRemindsEntity.setIsWarning(1);
+                        orderingEarlyWarningRemindsEntity.setCreateTime(new Date());
+
+                        insertRemiderList.add(orderingEarlyWarningRemindsEntity);
+                    }else{
+                        orderingEarlyWarningRemindsEntity.setAlarmTime(new Date());
+                        orderingEarlyWarningRemindsEntity.setAverageSales(new BigDecimal(totalSellVolumn));
+                        orderingEarlyWarningRemindsEntity.setTotalNum(totalNum);
+                        orderingEarlyWarningRemindsEntity.setIsWarning(1);
+                        orderingEarlyWarningRemindsEntity.setModTime(new Date());
+
+                        updateRemiderList.add(orderingEarlyWarningRemindsEntity);
+                    }
+
+                }else{
+                    Mall2OrderingEarlyWarningRemindsEntity orderingEarlyWarningRemindsEntity = mall2OrderingEarlyWarningRemindsDao.queryByGoodsId(goodsEntity.getId());
+                    if( orderingEarlyWarningRemindsEntity != null){
+                        orderingEarlyWarningRemindsEntity.setIsWarning(0);
+                        orderingEarlyWarningRemindsEntity.setModTime(new Date());
+                        updateRemiderList.add(orderingEarlyWarningRemindsEntity);
+                    }
+                }
+            }
+
+            if(insertRemiderList != null && insertRemiderList.size() > 0) {
+                mall2OrderingEarlyWarningRemindsDao.insertBatch(insertRemiderList);
+            }
+            if(updateRemiderList != null && updateRemiderList.size() > 0) {
+                mall2OrderingEarlyWarningRemindsDao.updateBatch(updateRemiderList);
+            }
+
+            insertRemiderList = null;
+            updateRemiderList = null;
+        }
+    }
 }

+ 123 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2ShippingReminderAlarmServiceImpl.java

@@ -1,14 +1,22 @@
 package com.kmall.admin.service.impl.alarm;
 
+import com.kmall.admin.dao.MerchDao;
+import com.kmall.admin.dao.ProductStoreRelaDao;
+import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.entity.MerchEntity;
+import com.kmall.admin.entity.ProductStoreRelaEntity;
+import com.kmall.admin.entity.StoreEntity;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 import com.kmall.admin.dao.alarm.Mall2ShippingReminderAlarmDao;
 import com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity;
 import com.kmall.admin.service.alarm.Mall2ShippingReminderAlarmService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 出货提醒预警表Service实现类
@@ -22,6 +30,16 @@ public class Mall2ShippingReminderAlarmServiceImpl implements Mall2ShippingRemin
     @Autowired
     private Mall2ShippingReminderAlarmDao mall2ShippingReminderAlarmDao;
 
+
+    @Autowired
+    private MerchDao merchDao; // 商户
+    @Autowired
+    private StoreDao storeDao; // 门店
+    @Autowired
+    private ProductStoreRelaDao productStoreRelaDao ; // 门店商品
+
+
+
     @Override
     public Mall2ShippingReminderAlarmEntity queryObject(Integer msraId) {
         return mall2ShippingReminderAlarmDao.queryObject(msraId);
@@ -56,4 +74,107 @@ public class Mall2ShippingReminderAlarmServiceImpl implements Mall2ShippingRemin
     public int deleteBatch(Integer[]msraIds) {
         return mall2ShippingReminderAlarmDao.deleteBatch(msraIds);
     }
+
+    /**
+     * 查询商品是否需要出货提醒
+     */
+    @Override
+    @Transactional
+    public void shippingReminds() {
+
+        // 查询所有商户
+        List<MerchEntity> merchEntities = merchDao.queryList(new HashMap<String, Object>());
+
+        // 遍历商户集合,查询商户下所有的门店
+        for(MerchEntity merchEntity : merchEntities){
+            Map<String,Object> storeParam = new HashMap();
+            storeParam.put("merchSn",merchEntity.getMerchSn());
+            storeParam.put("isValid","0");
+            List<StoreEntity> storeEntityList = storeDao.queryList(storeParam);
+            if(storeEntityList == null || storeEntityList.size() == 0){
+                continue;
+            }
+            storeParam = null;
+
+            // 需要新增的记录集合
+            List<Mall2ShippingReminderAlarmEntity> insertRemiderList = new ArrayList<>();
+            // 需要更新的记录集合
+            List<Mall2ShippingReminderAlarmEntity> updateRemiderList = new ArrayList<>();
+
+            // 遍历门店集合,查询门店下所有商品
+            for(StoreEntity storeEntity : storeEntityList){
+                Long storeId = storeEntity.getId();
+                List<ProductStoreRelaEntity> productStoreRelaEntities = productStoreRelaDao.queryByStoreId(storeId);
+                // 遍历商品集合,计算商品的平均销量
+                for(ProductStoreRelaEntity productStoreRelaEntity : productStoreRelaEntities){
+                    // 商品id
+                    Long goodsId = productStoreRelaEntity.getGoodsId();
+                    // 该商品的销售量
+                    Integer sellVolume = productStoreRelaEntity.getSellVolume();
+                    // 获取当前时间
+                    Date date = new Date();
+                    // 获取该商品的创建时间
+                    Date createTime = productStoreRelaEntity.getCreateTime();
+                    // 相差的天数
+                    int days = (int) ((date.getTime() - createTime.getTime()) / (1000*3600*24));
+                    days = days == 0? 1 : days;
+                    // 一周平均销售量
+                    Integer avaerageSellVolume = new BigDecimal(sellVolume).divide(new BigDecimal(days),2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(7))
+                            .setScale(0, BigDecimal.ROUND_HALF_UP).intValue();
+                    // 该商品的库存
+                    Integer stockNum = productStoreRelaEntity.getStockNum();
+                    if(stockNum <= avaerageSellVolume){
+                        Mall2ShippingReminderAlarmEntity mall2ShippingReminderAlarmEntity = mall2ShippingReminderAlarmDao.queryByGoodsIdAndStoreId(goodsId,storeId);
+                        if(mall2ShippingReminderAlarmEntity == null){
+                            mall2ShippingReminderAlarmEntity = new Mall2ShippingReminderAlarmEntity();
+                            mall2ShippingReminderAlarmEntity.setGoodsId(goodsId.intValue());
+                            mall2ShippingReminderAlarmEntity.setGoodsName(productStoreRelaEntity.getGoodsName());
+                            mall2ShippingReminderAlarmEntity.setAverageSales(new BigDecimal(avaerageSellVolume));
+                            mall2ShippingReminderAlarmEntity.setStoreId(storeId.intValue());
+                            mall2ShippingReminderAlarmEntity.setStoreName(storeEntity.getStoreName());
+                            mall2ShippingReminderAlarmEntity.setSku(productStoreRelaEntity.getSku());
+                            mall2ShippingReminderAlarmEntity.setStockNum(productStoreRelaEntity.getStockNum());
+                            mall2ShippingReminderAlarmEntity.setAlarmType("00");
+                            mall2ShippingReminderAlarmEntity.setAlarmTime(new Date());
+                            mall2ShippingReminderAlarmEntity.setIsWarning(1); // 1.为预警 0.为不预警
+                            mall2ShippingReminderAlarmEntity.setCreateTime(new Date());
+
+                            insertRemiderList.add(mall2ShippingReminderAlarmEntity);
+                        }else{
+                            mall2ShippingReminderAlarmEntity.setAverageSales(new BigDecimal(avaerageSellVolume));
+                            mall2ShippingReminderAlarmEntity.setStockNum(productStoreRelaEntity.getStockNum());
+                            mall2ShippingReminderAlarmEntity.setIsWarning(1);
+                            mall2ShippingReminderAlarmEntity.setAlarmTime(new Date());
+                            mall2ShippingReminderAlarmEntity.setModTime(new Date());
+
+                            updateRemiderList.add(mall2ShippingReminderAlarmEntity);
+                        }
+                    }else{
+                        Mall2ShippingReminderAlarmEntity mall2ShippingReminderAlarmEntity = mall2ShippingReminderAlarmDao.queryByGoodsIdAndStoreId(goodsId,storeId);
+                        if( mall2ShippingReminderAlarmEntity != null){
+                            mall2ShippingReminderAlarmEntity.setIsWarning(0);
+                            mall2ShippingReminderAlarmEntity.setModTime(new Date());
+                            updateRemiderList.add(mall2ShippingReminderAlarmEntity);
+                        }
+                    }
+
+                }
+            }
+
+            if(insertRemiderList != null && insertRemiderList.size() > 0) {
+                mall2ShippingReminderAlarmDao.insertBatch(insertRemiderList);
+            }
+            if(updateRemiderList != null && updateRemiderList.size() > 0) {
+                mall2ShippingReminderAlarmDao.updateBatch(updateRemiderList);
+            }
+
+            insertRemiderList = null;
+            updateRemiderList = null;
+
+        }
+
+
+
+
+    }
 }

+ 115 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/Mk2GoodsTopicPriceServiceImpl.java

@@ -1,14 +1,39 @@
 package com.kmall.admin.service.impl.mk;
 
+import com.google.common.collect.ImmutableBiMap;
+import com.google.common.collect.Maps;
+import com.kmall.admin.dao.GoodsDao;
+import com.kmall.admin.dao.mk.Mk2GoodsTopicHistoryPriceDao;
+import com.kmall.admin.dao.mk.store.StoreTopicDao;
+import com.kmall.admin.dto.StoreGoodsDto;
+import com.kmall.admin.dto.StoreTopicGoodsDto;
+import com.kmall.admin.entity.*;
+import com.kmall.admin.entity.mk.Mk2GoodsTopicHistoryPriceEntity;
+import com.kmall.admin.entity.mk.store.StoreTopicEntity;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
+import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.api.util.StockUtil;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.utils.MapBeanUtil;
+import com.kmall.common.utils.R;
+import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.ValidatorUtil;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
 import com.kmall.admin.dao.mk.Mk2GoodsTopicPriceDao;
 import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
 import com.kmall.admin.service.mk.Mk2GoodsTopicPriceService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 商品活动价格表Service实现类
@@ -21,6 +46,10 @@ import com.kmall.admin.service.mk.Mk2GoodsTopicPriceService;
 public class Mk2GoodsTopicPriceServiceImpl implements Mk2GoodsTopicPriceService {
     @Autowired
     private Mk2GoodsTopicPriceDao mk2GoodsTopicPriceDao;
+    @Autowired
+    private StoreTopicDao storeTopicDao;
+    @Autowired
+    private Mk2GoodsTopicHistoryPriceDao goodsTopicHistoryPriceDao;
 
     @Override
     public Mk2GoodsTopicPriceEntity queryObject(Integer mgthpId) {
@@ -56,4 +85,90 @@ public class Mk2GoodsTopicPriceServiceImpl implements Mk2GoodsTopicPriceService
     public int deleteBatch(Integer[]mgthpIds) {
         return mk2GoodsTopicPriceDao.deleteBatch(mgthpIds);
     }
+
+    @Override
+    @Transactional
+    public void uploadExcel(List<StoreTopicGoodsDto> storeTopicGoodsDtoList) throws ParseException {
+
+
+        if (storeTopicGoodsDtoList != null && storeTopicGoodsDtoList.size() > 0) {
+            StoreTopicEntity storeTopicEntity = null;
+
+            List<Mk2GoodsTopicPriceEntity> goodsTopicPriceEntityList = new ArrayList();
+            List<Mk2GoodsTopicHistoryPriceEntity> goodsTopicHistoryPriceEntityList = new ArrayList();
+
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+            for (int i = 0; i < storeTopicGoodsDtoList.size(); i++) {
+                StoreTopicGoodsDto storeTopicGoodsDto = storeTopicGoodsDtoList.get(i);
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(storeTopicGoodsDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("topic", "活动主题");
+                builder.put("topicName", "活动名称");
+                builder.put("merchSn", "商品编码");
+                builder.put("topicGoodsSku", "活动商品编码");
+                builder.put("topicGoodsPrice", "活动价格");
+                builder.put("topicBeginTime", "活动开始时间");
+                builder.put("topicEndTime", "活动结束时间");
+
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+                // 1.保存门店活动
+                if(storeTopicEntity == null){
+                    storeTopicEntity = new StoreTopicEntity();
+                    storeTopicEntity.setTitle(storeTopicGoodsDto.getTopic()); // 主题
+                    storeTopicEntity.setContent(storeTopicGoodsDto.getTopicContent()); // 内容
+                    storeTopicEntity.setSubtitle(storeTopicGoodsDto.getTopic());// 子标题
+                    storeTopicEntity.setPromTypeId(10); // 类别
+                    storeTopicEntity.setPromTypeName("每周活动");
+                    storeTopicEntity.setStoreId(Integer.parseInt(storeTopicGoodsDto.getShopSn()));
+                    storeTopicEntity.setIsValid("0");
+                    storeTopicDao.save(storeTopicEntity);
+                }
+
+                // 根据sku查询商品
+
+                // 2.保存门店商品价格
+                Mk2GoodsTopicPriceEntity goodsTopicPriceEntity = new Mk2GoodsTopicPriceEntity() ;
+                goodsTopicPriceEntity.setTopicId(storeTopicEntity.getId());
+                goodsTopicPriceEntity.setTopicType(storeTopicEntity.getPromTypeName());
+                goodsTopicPriceEntity.setTopicPrice(new BigDecimal(storeTopicGoodsDto.getTopicGoodsPrice()));
+                goodsTopicPriceEntity.setTopicName(storeTopicGoodsDto.getTopicName());
+                goodsTopicPriceEntity.setTopicContent(storeTopicGoodsDto.getTopicContent());
+                goodsTopicPriceEntity.setTopicGoodsSku(storeTopicGoodsDto.getTopicGoodsSku());
+                goodsTopicPriceEntity.setTopicBeginTime(format.parse(storeTopicGoodsDto.getTopicBeginTime()));
+                goodsTopicPriceEntity.setTopicEndTime((format.parse(storeTopicGoodsDto.getTopicEndTime())));
+                goodsTopicPriceEntity.setImportTime(new Date());
+                goodsTopicPriceEntityList.add(goodsTopicPriceEntity);
+
+                // 3.保存门店商品历史价格表
+                Mk2GoodsTopicHistoryPriceEntity goodsTopicHistoryPriceEntity = new Mk2GoodsTopicHistoryPriceEntity();
+                goodsTopicHistoryPriceEntity.setTopicId(storeTopicEntity.getId());
+                goodsTopicHistoryPriceEntity.setTopicType(storeTopicEntity.getPromTypeName());
+                goodsTopicHistoryPriceEntity.setTopicPrice(new BigDecimal(storeTopicGoodsDto.getTopicGoodsPrice()));
+                goodsTopicHistoryPriceEntity.setTopicGoodsSku(storeTopicGoodsDto.getTopicGoodsSku());
+                goodsTopicHistoryPriceEntity.setTopicName(storeTopicGoodsDto.getTopicName());
+                goodsTopicHistoryPriceEntity.setTopicContent(storeTopicGoodsDto.getTopicContent());
+                goodsTopicHistoryPriceEntity.setTopicBeginTime(format.parse(storeTopicGoodsDto.getTopicBeginTime()));
+                goodsTopicHistoryPriceEntity.setTopicEndTime((format.parse(storeTopicGoodsDto.getTopicEndTime())));
+                goodsTopicHistoryPriceEntityList.add(goodsTopicHistoryPriceEntity);
+
+
+            }
+            if(goodsTopicPriceEntityList != null && goodsTopicPriceEntityList.size() > 0) {
+                mk2GoodsTopicPriceDao.saveBatch(goodsTopicPriceEntityList);
+            }
+            if(goodsTopicHistoryPriceEntityList != null && goodsTopicHistoryPriceEntityList.size() > 0) {
+                goodsTopicHistoryPriceDao.saveBatch(goodsTopicHistoryPriceEntityList);
+            }
+
+
+
+        }
+
+
+
+    }
 }

+ 4 - 0
kmall-admin/src/main/java/com/kmall/admin/service/mk/Mk2GoodsTopicPriceService.java

@@ -1,7 +1,9 @@
 package com.kmall.admin.service.mk;
 
+import com.kmall.admin.dto.StoreTopicGoodsDto;
 import com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity;
 
+import java.text.ParseException;
 import java.util.List;
 import java.util.Map;
 
@@ -69,4 +71,6 @@ public interface Mk2GoodsTopicPriceService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] mgthpIds);
+
+    void uploadExcel(List<StoreTopicGoodsDto> storeTopicGoodsDtoList) throws ParseException;
 }

+ 45 - 0
kmall-admin/src/main/java/com/kmall/admin/task/OrderRemindsTask.java

@@ -0,0 +1,45 @@
+package com.kmall.admin.task;
+
+import com.kmall.admin.fromcomm.service.SysUserService;
+import com.kmall.admin.service.alarm.Mall2OrderingEarlyWarningRemindsService;
+import com.kmall.admin.websocket.WebSocketServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+/**
+ * 订货提醒定时器
+ * @author Scott
+ * @email
+ * @date 2016年11月30日 下午1:34:24
+ */
+@Component("orderRemindsTask")
+public class OrderRemindsTask {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private Mall2OrderingEarlyWarningRemindsService orderingEarlyWarningRemindsService;
+
+
+
+    @Scheduled(cron = "0/30 * * * * ?")
+    public void orderReminds() {
+        logger.info("订货提醒查询-----------------" );
+        try {
+            orderingEarlyWarningRemindsService.orderReminds();
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.info("订货提醒查询异常-----------------原因:"+e.getMessage() );
+        }
+
+        logger.info("订货提醒查询成功-----------" );
+
+    }
+
+
+
+
+}

+ 44 - 0
kmall-admin/src/main/java/com/kmall/admin/task/ShippingRemindsTask.java

@@ -0,0 +1,44 @@
+package com.kmall.admin.task;
+
+import com.kmall.admin.service.alarm.Mall2OrderingEarlyWarningRemindsService;
+import com.kmall.admin.service.alarm.Mall2ShippingReminderAlarmService;
+import com.kmall.admin.websocket.WebSocketServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+/**
+ * 出货提醒定时器
+ * @author Scott
+ * @email
+ * @date 2016年11月30日 下午1:34:24
+ */
+@Component("shippingRemindsTask")
+public class ShippingRemindsTask {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private Mall2ShippingReminderAlarmService shippingReminderAlarmService;
+
+
+
+    @Scheduled(cron = "0/30 * * * * ?")
+    public void shippingReminds() {
+        logger.info("出货提醒查询-----------------" );
+        try {
+            shippingReminderAlarmService.shippingReminds();
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.info("出货提醒查询异常-----------------原因:"+e.getMessage() );
+        }
+
+        logger.info("出货提醒查询成功-----------" );
+
+    }
+
+
+
+
+}

+ 25 - 0
kmall-admin/src/main/resources/XmlTemplate/StoreTopicDtoList.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="storeTopicGoodsDtoList" var="storeTopicGoodsDto"
+              varType="com.kmall.admin.dto.StoreTopicGoodsDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">storeTopicGoodsDto.topic</mapping>
+                <mapping row="1" col="1">storeTopicGoodsDto.topicName</mapping>
+                <mapping row="1" col="2">storeTopicGoodsDto.topicContent</mapping>
+                <mapping row="1" col="3">storeTopicGoodsDto.topicGoodsSku</mapping>
+                <mapping row="1" col="4">storeTopicGoodsDto.topicGoodsPrice</mapping>
+                <mapping row="1" col="5">storeTopicGoodsDto.topicBeginTime</mapping>
+                <mapping row="1" col="6">storeTopicGoodsDto.topicEndTime</mapping>
+                <mapping row="1" col="7">storeTopicGoodsDto.merchSn</mapping>
+                <mapping row="1" col="8">storeTopicGoodsDto.shopSn</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 26 - 0
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -690,4 +690,30 @@
         where a.goods_id = #{goodsId}
     </update>
 
+
+    <select id="queryByStoreId" resultType="com.kmall.admin.entity.ProductStoreRelaEntity">
+        select
+            a.`id`,
+            a.`store_id`,
+            a.`merch_sn`,
+            a.`product_id`,
+            a.`stock_num`,
+            a.`goods_id`,
+            a.`retail_price`,
+            a.`market_price`,
+            a.`stock_price`,
+            a.`sell_volume`,
+            a.sku,a.goods_biz_type, a.creater_sn, a.create_time, a.moder_sn, a.mod_time, a.tstm,
+            a.category_id,
+            a.attribute_category,
+            a.brand_id,
+            b.NAME goodsName,
+            a.freight_id,
+            supplier_third_id, a.hot_sort_num
+        from mall_product_store_rela a
+        left join mall_goods b on a.goods_id = b.id
+        where a.store_id = #{storeId}
+
+    </select>
+
 </mapper>

+ 3 - 0
kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml

@@ -126,6 +126,9 @@
 		<if test="isSupplierGoods != null and isSupplierGoods.trim() != ''">
 			AND t.is_supplier_goods = #{isSupplierGoods}
 		</if>
+		<if test="isValid != null and isValid.trim() != ''">
+			AND s.is_valid = #{isValid}
+		</if>
 		<if test="id != null">
 			AND s.id = #{id}
 		</if>

+ 79 - 1
kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2OrderingEarlyWarningRemindsDao.xml

@@ -55,6 +55,7 @@
     		`tstm`
 		from mall2_ordering_early_warning_reminds
 		WHERE 1=1
+		and is_warning = 1
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')
 		</if>
@@ -74,12 +75,13 @@
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall2_ordering_early_warning_reminds
 		WHERE 1=1
+		and is_warning = 1
         <if test="name != null and name.trim() != ''">
             AND name LIKE concat('%',#{name},'%')
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.alarm.Mall2OrderingEarlyWarningRemindsEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.alarm.Mall2OrderingEarlyWarningRemindsEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall2_ordering_early_warning_reminds(
 			`moewr_id`,
 			`goods_id`,
@@ -140,4 +142,80 @@
 		</foreach>
 	</delete>
 
+	<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+		insert into mall2_ordering_early_warning_reminds(
+			`moewr_id`,
+			`goods_id`,
+			`goods_name`,
+			`average_sales`,
+			`total_num`,
+			`alarm_type`,
+			`alarm_time`,
+			`is_warning`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`)
+		values
+		<foreach collection="list" index="index" item="item" separator=",">
+		(
+			#{item.moewrId},
+			#{item.goodsId},
+			#{item.goodsName},
+			#{item.averageSales},
+			#{item.totalNum},
+			#{item.alarmType},
+			#{item.alarmTime},
+			#{item.isWarning},
+			#{item.createrSn},
+			#{item.createTime},
+			#{item.moderSn},
+			#{item.modTime},
+			#{item.tstm}
+		)
+		</foreach>
+	</insert>
+
+
+	<update id="updateBatch" parameterType="java.util.List">
+		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
+			update mall2_ordering_early_warning_reminds
+			<set>
+				<if test="item.goodsId != null">`goods_id` = #{item.goodsId}, </if>
+				<if test="item.goodsName != null">`goods_name` = #{item.goodsName}, </if>
+				<if test="item.averageSales != null">`average_sales` = #{item.averageSales}, </if>
+				<if test="item.totalNum != null">`total_num` = #{item.totalNum}, </if>
+				<if test="item.alarmType != null">`alarm_type` = #{item.alarmType}, </if>
+				<if test="item.alarmTime != null">`alarm_time` = #{item.alarmTime}, </if>
+				<if test="item.isWarning != null">`is_warning` = #{item.isWarning}, </if>
+				<if test="item.createrSn != null">`creater_sn` = #{item.createrSn}, </if>
+				<if test="item.createTime != null">`create_time` = #{item.createTime}, </if>
+				<if test="item.moderSn != null">`moder_sn` = #{item.moderSn}, </if>
+				<if test="item.modTime != null">`mod_time` = #{item.modTime}, </if>
+				<if test="item.tstm != null">`tstm` = #{item.tstm}</if>
+			</set>
+			where moewr_id = #{item.moewrId}
+		</foreach>
+
+	</update>
+
+	<select id="queryByGoodsId" resultType="com.kmall.admin.entity.alarm.Mall2OrderingEarlyWarningRemindsEntity">
+		select
+			`moewr_id`,
+			`goods_id`,
+			`goods_name`,
+			`average_sales`,
+			`total_num`,
+			`alarm_type`,
+			`alarm_time`,
+			`is_warning`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall2_ordering_early_warning_reminds
+		where goods_id = #{goodsId}
+	</select>
 </mapper>

+ 89 - 1
kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2ShippingReminderAlarmDao.xml

@@ -64,6 +64,7 @@
     		`tstm`
 		from mall2_shipping_reminder_alarm
 		WHERE 1=1
+		and is_warning = 1
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')
 		</if>
@@ -83,12 +84,13 @@
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall2_shipping_reminder_alarm
 		WHERE 1=1
+		and is_warning = 1
         <if test="name != null and name.trim() != ''">
             AND name LIKE concat('%',#{name},'%')
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall2_shipping_reminder_alarm(
 			`msra_id`,
 			`goods_id`,
@@ -158,4 +160,90 @@
 		</foreach>
 	</delete>
 
+	<select id="queryByGoodsIdAndStoreId" resultType="com.kmall.admin.entity.alarm.Mall2ShippingReminderAlarmEntity">
+		select
+			`msra_id`,
+			`goods_id`,
+			`goods_name`,
+			`average_sales`,
+			`store_id`,
+			`sku`,
+			`store_name`,
+			`stock_num`,
+			`alarm_type`,
+			`alarm_time`,
+			`is_warning`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall2_shipping_reminder_alarm
+		where goods_id = #{goodsId} and store_id = #{storeId}
+	</select>
+
+	<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+		insert into mall2_shipping_reminder_alarm(
+			`msra_id`,
+			`goods_id`,
+			`goods_name`,
+			`average_sales`,
+			`store_id`,
+			`sku`,
+			`store_name`,
+			`stock_num`,
+			`alarm_type`,
+			`alarm_time`,
+			`is_warning`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`)
+		values
+		<foreach collection="list" index="index" item="item" separator=",">
+		 (
+			#{item.msraId},
+			#{item.goodsId},
+			#{item.goodsName},
+			#{item.averageSales},
+			#{item.storeId},
+			#{item.sku},
+			#{item.storeName},
+			#{item.stockNum},
+			#{item.alarmType},
+			#{item.alarmTime},
+			#{item.isWarning},
+			#{item.createrSn},
+			#{item.createTime},
+			#{item.moderSn},
+			#{item.modTime},
+			#{item.tstm}
+		)
+		</foreach>
+	</insert>
+
+	<update id="updateBatch" parameterType="java.util.List">
+		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
+			update mall2_shipping_reminder_alarm
+			<set>
+				<if test="item.goodsId != null">`goods_id` = #{item.goodsId}, </if>
+				<if test="item.goodsName != null">`goods_name` = #{item.goodsName}, </if>
+				<if test="item.averageSales != null">`average_sales` = #{item.averageSales}, </if>
+				<if test="item.storeId != null">`store_id` = #{item.storeId}, </if>
+				<if test="item.sku != null">`sku` = #{item.sku}, </if>
+				<if test="item.storeName != null">`store_name` = #{item.storeName}, </if>
+				<if test="item.stockNum != null">`stock_num` = #{item.stockNum}, </if>
+				<if test="item.alarmType != null">`alarm_type` = #{item.alarmType}, </if>
+				<if test="item.alarmTime != null">`alarm_time` = #{item.alarmTime}, </if>
+				<if test="item.isWarning != null">`is_warning` = #{item.isWarning}, </if>
+				<if test="item.createrSn != null">`creater_sn` = #{item.createrSn}, </if>
+				<if test="item.createTime != null">`create_time` = #{item.createTime}, </if>
+				<if test="item.moderSn != null">`moder_sn` = #{item.moderSn}, </if>
+				<if test="item.modTime != null">`mod_time` = #{item.modTime}, </if>
+				<if test="item.tstm != null">`tstm` = #{item.tstm}</if>
+			</set>
+			where msra_id = #{item.msraId}
+		</foreach>
+	</update>
 </mapper>

+ 58 - 2
kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicHistoryPriceDao.xml

@@ -1,7 +1,7 @@
 <?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.kmall.admin.admin.dao.mk.Mk2GoodsTopicHistoryPriceDao">
+<mapper namespace="com.kmall.admin.dao.mk.Mk2GoodsTopicHistoryPriceDao">
 
     <resultMap type="com.kmall.admin.entity.mk.Mk2GoodsTopicHistoryPriceEntity" id="mk2GoodsTopicHistoryPriceMap">
         <result property="mgthpId" column="mgthp_id"/>
@@ -10,6 +10,9 @@
         <result property="topicPrice" column="topic_price"/>
         <result property="topicName" column="topic_name"/>
         <result property="topicContent" column="topic_content"/>
+		<result property="topicGoodsSku" column="topic_goods_sku"/>
+		<result property="topicBeginTime" column="topic_begin_time"/>
+		<result property="topicEndTime" column="topic_end_time"/>
         <result property="createrSn" column="creater_sn"/>
         <result property="createTime" column="create_time"/>
         <result property="moderSn" column="moder_sn"/>
@@ -25,6 +28,9 @@
 			`topic_price`,
 			`topic_name`,
 			`topic_content`,
+			`topic_goods_sku`,
+			`topic_begin_time`,
+			`topic_end_time`,
 			`creater_sn`,
 			`create_time`,
 			`moder_sn`,
@@ -42,6 +48,9 @@
     		`topic_price`,
     		`topic_name`,
     		`topic_content`,
+			`topic_goods_sku`,
+			`topic_begin_time`,
+			`topic_end_time`,
     		`creater_sn`,
     		`create_time`,
     		`moder_sn`,
@@ -73,7 +82,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2GoodsTopicHistoryPriceEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2GoodsTopicHistoryPriceEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mk2_goods_topic_history_price(
 			`mgthp_id`,
 			`topic_id`,
@@ -81,6 +90,9 @@
 			`topic_price`,
 			`topic_name`,
 			`topic_content`,
+			`topic_goods_sku`,
+			`topic_begin_time`,
+			`topic_end_time`,
 			`creater_sn`,
 			`create_time`,
 			`moder_sn`,
@@ -93,6 +105,9 @@
 			#{topicPrice},
 			#{topicName},
 			#{topicContent},
+			#{topicGoodsSku},
+			#{topicBeginTime},
+			#{topicEndTime},
 			#{createrSn},
 			#{createTime},
 			#{moderSn},
@@ -108,6 +123,9 @@
 			<if test="topicPrice != null">`topic_price` = #{topicPrice}, </if>
 			<if test="topicName != null">`topic_name` = #{topicName}, </if>
 			<if test="topicContent != null">`topic_content` = #{topicContent}, </if>
+			<if test="topicGoodsSku != null">`topic_goods_sku` = #{topicGoodsSku}, </if>
+			<if test="topicBeginTime != null">`topic_begin_time` = #{topicBeginTime}, </if>
+			<if test="topicEndTime != null">`topic_end_time` = #{topicEndTime}, </if>
 			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
 			<if test="createTime != null">`create_time` = #{createTime}, </if>
 			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
@@ -128,4 +146,42 @@
 		</foreach>
 	</delete>
 
+
+	<insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+		insert into mk2_goods_topic_history_price(
+		`mgthp_id`,
+		`topic_id`,
+		`topic_type`,
+		`topic_price`,
+		`topic_name`,
+		`topic_content`,
+		`topic_goods_sku`,
+		`topic_begin_time`,
+		`topic_end_time`,
+		`creater_sn`,
+		`create_time`,
+		`moder_sn`,
+		`mod_time`,
+		`tstm`)
+		values
+		<foreach collection="list" index="index" item="item" separator=",">
+			(
+			#{item.mgthpId},
+			#{item.topicId},
+			#{item.topicType},
+			#{item.topicPrice},
+			#{item.topicName},
+			#{item.topicContent},
+			#{item.topicGoodsSku},
+			#{item.topicBeginTime},
+			#{item.topicEndTime},
+			#{item.createrSn},
+			#{item.createTime},
+			#{item.moderSn},
+			#{item.modTime},
+			#{item.tstm}
+			)
+		</foreach>
+	</insert>
+
 </mapper>

+ 70 - 8
kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicPriceDao.xml

@@ -1,7 +1,7 @@
 <?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.kmall.admin.dao.Mk2GoodsTopicPriceDao">
+<mapper namespace="com.kmall.admin.dao.mk.Mk2GoodsTopicPriceDao">
 
     <resultMap type="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity" id="mk2GoodsTopicPriceMap">
         <result property="mgthpId" column="mgthp_id"/>
@@ -10,7 +10,7 @@
         <result property="topicPrice" column="topic_price"/>
         <result property="topicName" column="topic_name"/>
         <result property="topicContent" column="topic_content"/>
-        <result property="topicGoodsId" column="topic_goods_id"/>
+        <result property="topicGoodsSku" column="topic_goods_sku"/>
         <result property="topicBeginTime" column="topic_begin_time"/>
         <result property="topicEndTime" column="topic_end_time"/>
         <result property="importTime" column="import_time"/>
@@ -29,7 +29,7 @@
 			`topic_price`,
 			`topic_name`,
 			`topic_content`,
-			`topic_goods_id`,
+			`topic_goods_sku`,
 			`topic_begin_time`,
 			`topic_end_time`,
 			`import_time`,
@@ -50,7 +50,7 @@
     		`topic_price`,
     		`topic_name`,
     		`topic_content`,
-    		`topic_goods_id`,
+    		`topic_goods_sku`,
     		`topic_begin_time`,
     		`topic_end_time`,
     		`import_time`,
@@ -85,7 +85,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mk2_goods_topic_price(
 			`mgthp_id`,
 			`topic_id`,
@@ -93,7 +93,7 @@
 			`topic_price`,
 			`topic_name`,
 			`topic_content`,
-			`topic_goods_id`,
+			`topic_goods_sku`,
 			`topic_begin_time`,
 			`topic_end_time`,
 			`import_time`,
@@ -109,7 +109,7 @@
 			#{topicPrice},
 			#{topicName},
 			#{topicContent},
-			#{topicGoodsId},
+			#{topicGoodsSku},
 			#{topicBeginTime},
 			#{topicEndTime},
 			#{importTime},
@@ -128,7 +128,7 @@
 			<if test="topicPrice != null">`topic_price` = #{topicPrice}, </if>
 			<if test="topicName != null">`topic_name` = #{topicName}, </if>
 			<if test="topicContent != null">`topic_content` = #{topicContent}, </if>
-			<if test="topicGoodsId != null">`topic_goods_id` = #{topicGoodsId}, </if>
+			<if test="topicGoodsSku != null">`topic_goods_sku` = #{topicGoodsSku}, </if>
 			<if test="topicBeginTime != null">`topic_begin_time` = #{topicBeginTime}, </if>
 			<if test="topicEndTime != null">`topic_end_time` = #{topicEndTime}, </if>
 			<if test="importTime != null">`import_time` = #{importTime}, </if>
@@ -152,4 +152,66 @@
 		</foreach>
 	</delete>
 
+
+	<select id="queryByTopicIdAndGoodsId" resultType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity">
+		select
+			`mgthp_id`,
+			`topic_id`,
+			`topic_type`,
+			`topic_price`,
+			`topic_name`,
+			`topic_content`,
+			`topic_goods_sku`,
+			`topic_begin_time`,
+			`topic_end_time`,
+			`import_time`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mk2_goods_topic_price
+		where topic_id = #{mgthpId} and topic_goods_sku = #{sku}
+	</select>
+
+
+	<insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+		insert into mk2_goods_topic_price(
+		`mgthp_id`,
+		`topic_id`,
+		`topic_type`,
+		`topic_price`,
+		`topic_name`,
+		`topic_content`,
+		`topic_goods_sku`,
+		`topic_begin_time`,
+		`topic_end_time`,
+		`import_time`,
+		`creater_sn`,
+		`create_time`,
+		`moder_sn`,
+		`mod_time`,
+		`tstm`)
+		values
+		<foreach collection="list" index="index" item="item" separator=",">
+			(
+			#{item.mgthpId},
+			#{item.topicId},
+			#{item.topicType},
+			#{item.topicPrice},
+			#{item.topicName},
+			#{item.topicContent},
+			#{item.topicGoodsSku},
+			#{item.topicBeginTime},
+			#{item.topicEndTime},
+			#{item.importTime},
+			#{item.createrSn},
+			#{item.createTime},
+			#{item.moderSn},
+			#{item.modTime},
+			#{item.tstm}
+			)
+		</foreach>
+	</insert>
+
 </mapper>

+ 1 - 1
kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2MemberBirthdayDao.xml

@@ -73,7 +73,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mk2_member_birthday(
 			`mmb_id`,
 			`topic_name`,

+ 25 - 8
kmall-admin/src/main/resources/mybatis/mapper/mk/store/MkStorePromTypeDao.xml

@@ -64,7 +64,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from mk_store_prom_type
 		WHERE 1=1
@@ -72,7 +72,7 @@
             AND name LIKE concat('%',#{name},'%')
         </if>
 	</select>
-	 
+
 	<insert id="save" parameterType="com.kmall.admin.entity.mk.store.MkStorePromTypeEntity" useGeneratedKeys="true" keyProperty="promTypeId">
 		insert into mk_store_prom_type(
 			`title`,
@@ -97,9 +97,9 @@
 			#{modTime},
 			#{tstm})
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.entity.mk.store.MkStorePromTypeEntity">
-		update mk_store_prom_type 
+		update mk_store_prom_type
 		<set>
 			<if test="title != null">`title` = #{title}, </if>
 			<if test="promTypeName != null">`prom_type_name` = #{promTypeName}, </if>
@@ -114,16 +114,33 @@
 		</set>
 		where prom_type_id = #{promTypeId}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mk_store_prom_type where prom_type_id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from mk_store_prom_type where prom_type_id in 
+		delete from mk_store_prom_type where prom_type_id in
 		<foreach item="promTypeId" collection="array" open="(" separator="," close=")">
 			#{promTypeId}
 		</foreach>
 	</delete>
 
-</mapper>
+	<select id="queryByName" resultType="com.kmall.admin.entity.mk.store.MkStorePromTypeEntity">
+		select
+			`prom_type_id`,
+			`title`,
+			`prom_type_name`,
+			`pic_url`,
+			`is_valid`,
+			`note`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mk_store_prom_type
+		where prom_type_name like concat('%',#{promTypeName},'%')
+	</select>
+
+</mapper>

+ 22 - 0
kmall-admin/src/main/resources/mybatis/mapper/mk/store/StoreTopicDao.xml

@@ -188,4 +188,26 @@
 		</foreach>
 	</delete>
 
+	<select id="queryByStoreIdAndType" resultType="com.kmall.admin.entity.mk.store.StoreTopicEntity">
+		select
+			`id`,
+			`title`,
+			`content`,
+			`item_pic_url`,
+			`subtitle`,
+			`prom_type_id`,
+			`topic_price`,
+			`store_id`,
+			`third_merch_sn`,
+			`is_valid`,
+			`note`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall_store_topic
+		where prom_type_id = #{promTypeId} and store_id = #{storeId} and is_valid = 0 limit 1
+	</select>
+
 </mapper>

+ 1 - 1
kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2MemberConsumptionRecordsDao.xml

@@ -73,7 +73,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2MemberConsumptionRecordsEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2MemberConsumptionRecordsEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall2_member_consumption_records(
 			`mmcr_id`,
 			`user_id`,

+ 16 - 1
kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2MemberPointsDao.xml

@@ -67,7 +67,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2MemberPointsEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2MemberPointsEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall2_member_points(
 			`mmp_id`,
 			`user_id`,
@@ -116,4 +116,19 @@
 		</foreach>
 	</delete>
 
+	<select id="queryByUserId" resultType="com.kmall.admin.entity.vip.Mall2MemberPointsEntity">
+		select
+			`mmp_id`,
+			`user_id`,
+			`points`,
+			`points_expire_date`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall2_member_points
+		where user_id = #{userId}
+	</select>
+
 </mapper>

+ 1 - 1
kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml

@@ -70,7 +70,7 @@
         </if>
 	</select>
 
-	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2PointsRulesEntity">
+	<insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2PointsRulesEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall2_points_rules(
 			`mpr_id`,
 			`points_type`,

+ 8 - 0
kmall-admin/src/main/webapp/WEB-INF/page/mk/mk2goodstopicprice.html

@@ -14,6 +14,14 @@
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
+                <i-col style="display: inline-grid;">
+                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
+                            :format="['xls','xlsx']"
+                            action="../mk2goodstopicprice/goodsTopicPriceUpload">
+                        <i-button type="ghost" icon="ios-cloud-upload-outline">活动商品导入</i-button>
+                    </Upload>
+                </i-col>
+                <a href="../statics/file/store_topic_goods_export_yyyy_mm_dd_v1.0.0.xlsx">活动商品模板下载</a>&nbsp;&nbsp;&nbsp;
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("mk2goodstopicprice:save"))

+ 3 - 22
kmall-admin/src/main/webapp/WEB-INF/page/mk/storetopic.html

@@ -14,17 +14,12 @@
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
+
             </div>
             <div class="buttons-group">
-                #if($shiro.hasPermission("storetopic:save"))
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-                #end
-                #if($shiro.hasPermission("storetopic:update"))
                 <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
-                #end
-                #if($shiro.hasPermission("storetopic:delete"))
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                #end
             </div>
         </Row>
 	    <table id="jqGrid"></table>
@@ -67,21 +62,7 @@
             <Form-item label="备注" prop="note">
                 <i-input v-model="storeTopic.note" placeholder="备注"/>
             </Form-item>
-            <Form-item label="创建人编号" prop="createrSn">
-                <i-input v-model="storeTopic.createrSn" placeholder="创建人编号"/>
-            </Form-item>
-            <Form-item label="创建时间" prop="createTime">
-                <i-input v-model="storeTopic.createTime" placeholder="创建时间"/>
-            </Form-item>
-            <Form-item label="修改人编号" prop="moderSn">
-                <i-input v-model="storeTopic.moderSn" placeholder="修改人编号"/>
-            </Form-item>
-            <Form-item label="修改时间" prop="modTime">
-                <i-input v-model="storeTopic.modTime" placeholder="修改时间"/>
-            </Form-item>
-            <Form-item label="时间戳" prop="tstm">
-                <i-input v-model="storeTopic.tstm" placeholder="时间戳"/>
-            </Form-item>
+
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                 <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
@@ -93,4 +74,4 @@
 
 <script src="${rc.contextPath}/js/mk/storetopic.js?_${date.systemTime}"></script>
 </body>
-</html>
+</html>

+ 6 - 27
kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2memberconsumptionrecords.html

@@ -10,22 +10,15 @@
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    <i-input v-model="q.userId" @on-enter="query" placeholder="用户id"/>
+                </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
-            <div class="buttons-group">
-                #if($shiro.hasPermission("mall2memberconsumptionrecords:save"))
-                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-                #end
-                #if($shiro.hasPermission("mall2memberconsumptionrecords:update"))
-                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
-                #end
-                #if($shiro.hasPermission("mall2memberconsumptionrecords:delete"))
-                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                #end
-            </div>
+
         </Row>
 	    <table id="jqGrid"></table>
 	    <div id="jqGridPager"></div>
@@ -49,21 +42,7 @@
             <Form-item label="是否使用生日优惠" prop="isUseBirthdayOffer">
                 <i-input v-model="mall2MemberConsumptionRecords.isUseBirthdayOffer" placeholder="是否使用生日优惠"/>
             </Form-item>
-            <Form-item label="+创建人编号" prop="createrSn">
-                <i-input v-model="mall2MemberConsumptionRecords.createrSn" placeholder="+创建人编号"/>
-            </Form-item>
-            <Form-item label="+创建时间,yyyy-MM-dd HH:mm:ss" prop="createTime">
-                <i-input v-model="mall2MemberConsumptionRecords.createTime" placeholder="+创建时间,yyyy-MM-dd HH:mm:ss"/>
-            </Form-item>
-            <Form-item label="+修改人编号" prop="moderSn">
-                <i-input v-model="mall2MemberConsumptionRecords.moderSn" placeholder="+修改人编号"/>
-            </Form-item>
-            <Form-item label="+修改时间,yyyy-MM-dd HH:mm:ss" prop="modTime">
-                <i-input v-model="mall2MemberConsumptionRecords.modTime" placeholder="+修改时间,yyyy-MM-dd HH:mm:ss"/>
-            </Form-item>
-            <Form-item label="+时间戳" prop="tstm">
-                <i-input v-model="mall2MemberConsumptionRecords.tstm" placeholder="+时间戳"/>
-            </Form-item>
+
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                 <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>

+ 4 - 28
kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2memberpoints.html

@@ -10,22 +10,12 @@
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    <i-input v-model="q.userId" @on-enter="query" placeholder="用户id"/>
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
-            <div class="buttons-group">
-                #if($shiro.hasPermission("mall2memberpoints:save"))
-                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-                #end
-                #if($shiro.hasPermission("mall2memberpoints:update"))
-                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
-                #end
-                #if($shiro.hasPermission("mall2memberpoints:delete"))
-                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                #end
-            </div>
+
         </Row>
 	    <table id="jqGrid"></table>
 	    <div id="jqGridPager"></div>
@@ -43,21 +33,7 @@
             <Form-item label="积分到期时间" prop="pointsExpireDate">
                 <i-input v-model="mall2MemberPoints.pointsExpireDate" placeholder="积分到期时间"/>
             </Form-item>
-            <Form-item label="+创建人编号" prop="createrSn">
-                <i-input v-model="mall2MemberPoints.createrSn" placeholder="+创建人编号"/>
-            </Form-item>
-            <Form-item label="+创建时间,yyyy-MM-dd HH:mm:ss" prop="createTime">
-                <i-input v-model="mall2MemberPoints.createTime" placeholder="+创建时间,yyyy-MM-dd HH:mm:ss"/>
-            </Form-item>
-            <Form-item label="+修改人编号" prop="moderSn">
-                <i-input v-model="mall2MemberPoints.moderSn" placeholder="+修改人编号"/>
-            </Form-item>
-            <Form-item label="+修改时间,yyyy-MM-dd HH:mm:ss" prop="modTime">
-                <i-input v-model="mall2MemberPoints.modTime" placeholder="+修改时间,yyyy-MM-dd HH:mm:ss"/>
-            </Form-item>
-            <Form-item label="+时间戳" prop="tstm">
-                <i-input v-model="mall2MemberPoints.tstm" placeholder="+时间戳"/>
-            </Form-item>
+
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                 <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
@@ -67,6 +43,6 @@
 	</Card>
 </div>
 
-<script src="${rc.contextPath}/vip/shop/mall2memberpoints.js?_${date.systemTime}"></script>
+<script src="${rc.contextPath}/js/vip/mall2memberpoints.js?_${date.systemTime}"></script>
 </body>
 </html>

+ 9 - 7
kmall-admin/src/main/webapp/js/alarm/mall2orderingearlywarningreminds.js

@@ -4,13 +4,15 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'moewrId', name: 'moewrId', index: 'moewr_id', key: true, hidden: true},
-			{label: '商品id', name: 'goodsId', index: 'goods_id', width: 80},
-			{label: '商品名称', name: 'goodsName', index: 'goods_name', width: 80},
-			{label: '平均销量', name: 'averageSales', index: 'average_sales', width: 80},
-			{label: '总库存数', name: 'totalNum', index: 'total_num', width: 80},
-			{label: '预警条件  00 周  10  月', name: 'alarmType', index: 'alarm_type', width: 80},
-			{label: '预警时间', name: 'alarmTime', index: 'alarm_time', width: 80},
-			{label: '是否已经预警', name: 'isWarning', index: 'is_warning', width: 80},
+			{label: '商品id', name: 'goodsId', index: 'goods_id', align:"center",width: 80},
+			{label: '商品名称', name: 'goodsName', index: 'goods_name',align:"center", width: 80},
+			{label: '平均销量', name: 'averageSales', index: 'average_sales',align:"center", width: 80},
+			{label: '总库存数', name: 'totalNum', index: 'total_num',align:"center", width: 80},
+			{
+				label: '预警时间', name: 'alarmTime', index: 'alarm_time',align:"center", width: 80, formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}
+			}
 			],
 		viewrecords: true,
         height: 550,

+ 12 - 11
kmall-admin/src/main/webapp/js/alarm/mall2shippingreminderalarm.js

@@ -3,17 +3,18 @@ $(function () {
         url: '../mall2shippingreminderalarm/list',
         datatype: "json",
         colModel: [
-			{label: 'msraId', name: 'msraId', index: 'msra_id', key: true, hidden: true},
-			{label: '商品id', name: 'goodsId', index: 'goods_id', width: 80},
-			{label: '商品名称', name: 'goodsName', index: 'goods_name', width: 80},
-			{label: '平均销量', name: 'averageSales', index: 'average_sales', width: 80},
-			{label: '门店id', name: 'storeId', index: 'store_id', width: 80},
-			{label: '门店商品sku', name: 'sku', index: 'sku', width: 80},
-			{label: '门店名称', name: 'storeName', index: 'store_name', width: 80},
-			{label: '门店库存数', name: 'stockNum', index: 'stock_num', width: 80},
-			{label: '预警条件  00 周  10  月', name: 'alarmType', index: 'alarm_type', width: 80},
-			{label: '预警时间', name: 'alarmTime', index: 'alarm_time', width: 80},
-			{label: '是否已经预警', name: 'isWarning', index: 'is_warning', width: 80},
+			{label: 'msraId', name: 'msraId', index: 'msra_id',  key: true, hidden: true},
+			{label: '门店id', name: 'storeId', index: 'store_id',align:"center", width: 80},
+			{label: '门店商品sku', name: 'sku', index: 'sku',align:"center", width: 80},
+			{label: '门店名称', name: 'storeName', index: 'store_name',align:"center", width: 80},
+			{label: '商品名称', name: 'goodsName', index: 'goods_name',align:"center", width: 100},
+			{label: '剩余库存数', name: 'stockNum', index: 'stock_num',align:"center", width: 80},
+			{label: '平均销量', name: 'averageSales', index: 'average_sales',align:"center", width: 80},
+			{
+				label: '预警时间', name: 'alarmTime', index: 'alarm_time',align:"center", width: 80, formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}
+			}
 			],
 		viewrecords: true,
         height: 550,

+ 6 - 11
kmall-admin/src/main/webapp/js/mk/mk2goodstopichistoryprice.js

@@ -4,16 +4,11 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'mgthpId', name: 'mgthpId', index: 'mgthp_id', key: true, hidden: true},
-			{label: '活动id', name: 'topicId', index: 'topic_id', width: 80},
-			{label: '活动类别', name: 'topicType', index: 'topic_type', width: 80},
-			{label: '活动价格', name: 'topicPrice', index: 'topic_price', width: 80},
-			{label: '活动名称', name: 'topicName', index: 'topic_name', width: 80},
-			{label: '活动内容', name: 'topicContent', index: 'topic_content', width: 80},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '修改时间', name: 'modTime', index: 'mod_time', width: 80},
-			{label: '时间戳', name: 'tstm', index: 'tstm', width: 80}],
+			{label: '活动id', name: 'topicId', index: 'topic_id', align: 'center',width: 80},
+			{label: '活动类别', name: 'topicType', index: 'topic_type', align: 'center',width: 80},
+			{label: '活动价格', name: 'topicPrice', index: 'topic_price', align: 'center',width: 80},
+			{label: '活动名称', name: 'topicName', index: 'topic_name',align: 'center', width: 80},
+			{label: '活动内容', name: 'topicContent', index: 'topic_content', align: 'center',width: 80}],
 		viewrecords: true,
         height: 550,
         rowNum: 10,
@@ -145,4 +140,4 @@ let vm = new Vue({
             handleResetForm(this, name);
         }
 	}
-});
+});

+ 50 - 16
kmall-admin/src/main/webapp/js/mk/mk2goodstopicprice.js

@@ -4,20 +4,22 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'mgthpId', name: 'mgthpId', index: 'mgthp_id', key: true, hidden: true},
-			{label: '活动id', name: 'topicId', index: 'topic_id', width: 80},
-			{label: '活动类别', name: 'topicType', index: 'topic_type', width: 80},
-			{label: '活动价格', name: 'topicPrice', index: 'topic_price', width: 80},
-			{label: '活动名称', name: 'topicName', index: 'topic_name', width: 80},
-			{label: '活动内容', name: 'topicContent', index: 'topic_content', width: 80},
-			{label: '活动产品', name: 'topicGoodsId', index: 'topic_goods_id', width: 80},
-			{label: '活动开始时间', name: 'topicBeginTime', index: 'topic_begin_time', width: 80},
-			{label: '活动结束时间', name: 'topicEndTime', index: 'topic_end_time', width: 80},
-			{label: '导入时间', name: 'importTime', index: 'import_time', width: 80},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '修改时间', name: 'modTime', index: 'mod_time', width: 80},
-			{label: '时间戳', name: 'tstm', index: 'tstm', width: 80}],
+			{label: '活动id', name: 'topicId', index: 'topic_id', align: 'center',width: 80},
+			{label: '活动类别', name: 'topicType', index: 'topic_type', align: 'center',width: 80},
+			{label: '活动价格', name: 'topicPrice', index: 'topic_price',align: 'center', width: 80},
+			{label: '活动名称', name: 'topicName', index: 'topic_name' ,align: 'center',width: 80},
+			{label: '活动内容', name: 'topicContent', index: 'topic_content', align: 'center',width: 80},
+			{label: '活动产品', name: 'topicGoodsId', index: 'topic_goods_id', align: 'center',width: 80},
+			{label: '活动开始时间', name: 'topicBeginTime', index: 'topic_begin_time', width: 80,align: 'center',
+				formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}},
+			{label: '活动结束时间', name: 'topicEndTime', index: 'topic_end_time', width: 80,align: 'center',
+				formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}}
+
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,
@@ -140,6 +142,32 @@ let vm = new Vue({
             }).trigger("reloadGrid");
             vm.handleReset('formValidate');
 		},
+		uploadExcelSuccess: function () {
+			alert('上传成功', function (index) {
+				$("#jqGrid").trigger("reloadGrid");
+			});
+		},
+		uploadExcelError: function () {
+			alert('上传出现异常');
+		},
+		uploadExcelSuccess: function (data) {
+			if(data.code==0){
+				alert('导入成功', function (index) {
+					vm.reload();
+				});
+			}else{
+				if(data.msg == '导入成功!'){
+					alert(data.msg);
+					vm.reload();
+				}else {
+					alert(data.msg);
+				}
+			}
+		},
+		uploadExcelError: function (data) {
+			console.log(data);
+			alert('上传出现异常,请重试!');
+		},
         handleSubmit: function (name) {
             handleSubmitValidate(this, name, function () {
                 vm.saveOrUpdate()
@@ -147,6 +175,12 @@ let vm = new Vue({
         },
         handleReset: function (name) {
             handleResetForm(this, name);
-        }
+        },
+		uploadExcelFormatError: function (file) {
+			this.$Notice.warning({
+				title: '文件格式不正确',
+				desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
+			});
+		}
 	}
-});
+});

+ 7 - 16
kmall-admin/src/main/webapp/js/mk/storetopic.js

@@ -4,15 +4,15 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-			{label: '活动主题', name: 'title', index: 'title', width: 80},
-			{label: '活动内容', name: 'content', index: 'content', width: 80},
+			{label: '活动主题', name: 'title', index: 'title', align: 'center',width: 80},
+			{label: '活动内容', name: 'content', index: 'content',align: 'center', width: 80},
 			// {label: '活动图片', name: 'itemPicUrl', index: 'item_pic_url', width: 80},
-			{label: '子标题', name: 'subtitle', index: 'subtitle', width: 80},
-			{label: '活动类别名称', name: 'promTypeName', index: 'prom_type_id', width: 80},
+			{label: '子标题', name: 'subtitle', index: 'subtitle', align: 'center',width: 80},
+			{label: '活动类别名称', name: 'promTypeName', index: 'prom_type_id',align: 'center', width: 80},
 			// {label: '活动价格', name: 'priceInfo', index: 'price_info', width: 80},
 			// {label: '场景图片链接', name: 'scenePicUrl', index: 'scene_pic_url', width: 80},
-			{label: '门店名称', name: 'storeName', index: 'store_id', width: 80},
-			{label: '第三方商户名称', name: 'thirdPartyMerchName', index: 'third_merch_sn', width: 80},
+			{label: '门店名称', name: 'storeName', index: 'store_id', align: 'center',width: 80},
+			{label: '第三方商户名称', name: 'thirdPartyMerchName', index: 'third_merch_sn',align: 'center', width: 80},
             {label: '是否有效', name: 'isValid', index: 'is_valid', width: 50, align: 'center',
                 formatter: function (value) {
                     if (value == '0') {
@@ -24,16 +24,7 @@ $(function () {
                 }
             },
 			{label: '备注', name: 'note', index: 'note', width: 80},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80,
-                formatter: function (value) {
-                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
-                }},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '修改时间', name: 'modTime', index: 'mod_time', width: 80,
-                formatter: function (value) {
-                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
-                }}],
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,

+ 41 - 9
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -31,6 +31,7 @@ let vm = new Vue({
         currentOrderNo:null,
         customname:'',
         customidcard:'',
+        machineCode:'',
         storeId:null,
         index:0,
         max:0,
@@ -96,8 +97,9 @@ let vm = new Vue({
             goods.sellVolume = goods.sellVolume - 1;
         },
         deleteItem:function(value){
+            console.log(value);
             // 删除这条记录
-            this.goodsList.splice(value,1,"");
+            this.goodsList.splice(value,1);
             this.index = value;
 
         },
@@ -116,9 +118,9 @@ let vm = new Vue({
         },
         submitOrder:function(){
             $('#payCode').unbind('keydown').keydown(function(event){});
+            vm.machineCode = sessionStorage.getItem("machineCode");
 
-
-            var param = {'userInfo':vm.userInfo,'payCode':this.$refs.payCode.currentValue,'goodsList':vm.goodsList,'sessionId':vm.sessionId};
+            var param = {'userInfo':vm.userInfo,'payCode':this.$refs.payCode.currentValue,'goodsList':vm.goodsList,'sessionId':vm.sessionId,'machineCode':vm.machineCode};
             this.$refs.payCode.currentValue = '';
             $.ajax({
                 type: "POST",
@@ -134,7 +136,7 @@ let vm = new Vue({
                             })
                             // 打印取货码小票
                             var content = getPrintContent(r.resultObj);
-                            printArea(content);
+                            printArea2(content);
                             vm.goodsList = [];
                             vm.customname = '' ;
                             vm.customidcard = '';
@@ -176,13 +178,13 @@ let vm = new Vue({
                 return ;
             }
             if(!idcardReg.test(this.userInfo.customIDCard)){
-                // alert("请输入正确的身份证号");
-                // return ;
+                alert("请输入正确的身份证号");
+                return ;
             }
 
             if(!(/^1[3456789]\d{9}$/.test(this.userInfo.customPhone))){
-                // alert("手机号码有误,请重填");
-                // return ;
+                alert("手机号码有误,请重填");
+                return ;
             }
 
 
@@ -377,13 +379,43 @@ function printArea(content) {
     doc.write('<div class="">' + content
         + '</div>');
     doc.close();
-    console.log(doc);
     var frameWindow = iframe.contentWindow;
     frameWindow.close();
     frameWindow.focus();
     // frameWindow.print();
     frameWindow.print();
 }
+
+function printArea2(content) {
+    var idPrefix = "printArea_";
+    removePrintArea(idPrefix + printAreaCount);
+    printAreaCount++;
+    var iframeId = idPrefix + printAreaCount;
+    var iframeStyle = 'width:0px;height:0px;left:0px;top:0px;';
+    iframe = document.createElement('IFRAME');
+    $(iframe).attr({
+        style: iframeStyle,
+        id: iframeId
+    });
+    document.body.appendChild(iframe);
+    var doc = iframe.contentWindow.document;
+    doc.open();
+    //$(document).find("link").filter(function () {
+    //return $(this).attr("rel").toLowerCase() == "stylesheet";
+    //}).each(
+    //function () {
+    //doc.write('<link type="text/css" rel="stylesheet" href="'
+    //+ $(this).attr("href") + '" >');
+    //});
+    doc.write('<div class="">' + content
+        + '</div>');
+    doc.close();
+    var frameWindow = iframe.contentWindow;
+    frameWindow.close();
+    frameWindow.focus();
+    frameWindow.print();
+    frameWindow.print();
+}
 var removePrintArea = function (id) {
     $("iframe#" + id).remove();
 };

+ 2 - 6
kmall-admin/src/main/webapp/js/vip/mall2memberconsumptionrecords.js

@@ -9,11 +9,7 @@ $(function () {
 			{label: '消费时间', name: 'consumptionTime', index: 'consumption_time', width: 80},
 			{label: '消费门店id', name: 'shopSn', index: 'shop_sn', width: 80},
 			{label: '是否使用生日优惠', name: 'isUseBirthdayOffer', index: 'is_use_birthday_offer', width: 80},
-			{label: '+创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '+创建时间,yyyy-MM-dd HH:mm:ss', name: 'createTime', index: 'create_time', width: 80},
-			{label: '+修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '+修改时间,yyyy-MM-dd HH:mm:ss', name: 'modTime', index: 'mod_time', width: 80},
-			{label: '+时间戳', name: 'tstm', index: 'tstm', width: 80}],
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,
@@ -145,4 +141,4 @@ let vm = new Vue({
             handleResetForm(this, name);
         }
 	}
-});
+});

+ 2 - 6
kmall-admin/src/main/webapp/js/vip/mall2memberpoints.js

@@ -7,11 +7,7 @@ $(function () {
 			{label: '用户id', name: 'userId', index: 'user_id', width: 80},
 			{label: '积分数', name: 'points', index: 'points', width: 80},
 			{label: '积分到期时间', name: 'pointsExpireDate', index: 'points_expire_date', width: 80},
-			{label: '+创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '+创建时间,yyyy-MM-dd HH:mm:ss', name: 'createTime', index: 'create_time', width: 80},
-			{label: '+修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '+修改时间,yyyy-MM-dd HH:mm:ss', name: 'modTime', index: 'mod_time', width: 80},
-			{label: '+时间戳', name: 'tstm', index: 'tstm', width: 80}],
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,
@@ -143,4 +139,4 @@ let vm = new Vue({
             handleResetForm(this, name);
         }
 	}
-});
+});

+ 2 - 6
kmall-admin/src/main/webapp/js/vip/mall2pointsrules.js

@@ -8,11 +8,7 @@ $(function () {
 			{label: '积分规则适用开始时间', name: 'pointsBeginTime', index: 'points_begin_time', width: 80},
 			{label: '积分规则适用结束时间', name: 'pointsEndTime', index: 'points_end_time', width: 80},
 			{label: '积分规则是否有效', name: 'isValid', index: 'is_valid', width: 80},
-			{label: '+创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '+创建时间,yyyy-MM-dd HH:mm:ss', name: 'createTime', index: 'create_time', width: 80},
-			{label: '+修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '+修改时间,yyyy-MM-dd HH:mm:ss', name: 'modTime', index: 'mod_time', width: 80},
-			{label: '+时间戳', name: 'tstm', index: 'tstm', width: 80}],
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,
@@ -144,4 +140,4 @@ let vm = new Vue({
             handleResetForm(this, name);
         }
 	}
-});
+});

BIN
kmall-admin/src/main/webapp/statics/file/store_topic_goods_export_yyyy_mm_dd_v1.0.0.xlsx


+ 2 - 0
kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

@@ -16,6 +16,8 @@ public class JxlsXmlTemplateName {
     public static final String SYS_USER_DTO_LIST = "/XmlTemplate/SysUserDtoList.xml";
     //门店商品导入
     public static final String STORE_GOODS_DTO_LIST = "/XmlTemplate/StoreGoodsDtoList.xml";
+    //活动商品价格导入
+    public static final String STORE_TOPIC_DTO_LIST = "/XmlTemplate/StoreTopicDtoList.xml";
 
     public static final String STORE_ID_DTO_LIST = "/XmlTemplate/StoreIdDtoList.xml";