Kaynağa Gözat

Merge remote-tracking branch 'origin/developerF' into developerF

Aslee 3 yıl önce
ebeveyn
işleme
890646c02b

+ 2 - 0
src/main/java/com/caimei/modules/archive/dao/CmOrderArchiveDao.java

@@ -37,4 +37,6 @@ public interface CmOrderArchiveDao extends CrudDao<CmOrderArchive> {
     String getShopNameByShopOrderId(Integer shopOrderId);
 
     String getClubNameByShopOrderId(Integer shopOrderId);
+
+    void updateArchiveNo(CmOrderArchive cmOrderArchive);
 }

+ 9 - 0
src/main/java/com/caimei/modules/archive/entity/CmOrderArchive.java

@@ -30,6 +30,7 @@ public class CmOrderArchive extends DataEntity<CmOrderArchive> {
 	private Integer orderStatus;	// 主订单状态:0待确认,11待收待发,12待收部发,13待收全发,21部收待发,22部收部发,23部收全发,31已收待发,32已收部发,33已收全发,4交易完成,5订单完成,6已关闭,7交易全退
 	private Integer fileNum;		//文件数量
 
+	private Integer updateShopOrderIdFlag;		// 修改子订单id标识,1修改,其他不修改
 	/**
 	 * 上传文件id,以","隔开
 	 */
@@ -153,4 +154,12 @@ public class CmOrderArchive extends DataEntity<CmOrderArchive> {
 	public void setFileNum(Integer fileNum) {
 		this.fileNum = fileNum;
 	}
+
+	public Integer getUpdateShopOrderIdFlag() {
+		return updateShopOrderIdFlag;
+	}
+
+	public void setUpdateShopOrderIdFlag(Integer updateShopOrderIdFlag) {
+		this.updateShopOrderIdFlag = updateShopOrderIdFlag;
+	}
 }

+ 18 - 9
src/main/java/com/caimei/modules/archive/service/CmOrderArchiveService.java

@@ -8,18 +8,9 @@ import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
-import com.aliyun.oss.OSS;
-import com.aliyun.oss.OSSClientBuilder;
 import com.caimei.modules.archive.entity.CmOrderArchiveFile;
 import com.caimei.modules.archive.utils.OssArchiveUtil;
-import com.caimei.modules.oss.entity.CmOssArchivePdf;
-import com.caimei.modules.oss.utils.OSSUtils;
-import com.caimei.modules.product.entity.Product;
-import com.caimei.utils.CodeUtil;
 import com.caimei.utils.StringUtil;
-import com.thinkgem.jeesite.common.config.Global;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -62,6 +53,11 @@ public class CmOrderArchiveService extends CrudService<CmOrderArchiveDao, CmOrde
 	public void saveArchive(CmOrderArchive cmOrderArchive) {
         if (cmOrderArchive.getIsNewRecord()) {
             cmOrderArchive.setAddTime(new Date());
+        } else {
+            CmOrderArchive dbOrderArchive = get(cmOrderArchive.getId());
+            if (!cmOrderArchive.getShopOrderId().equals(dbOrderArchive.getShopOrderId()) ) {
+                cmOrderArchive.setUpdateShopOrderIdFlag(1);
+            }
         }
         SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
         String date = format.format(new Date());
@@ -238,4 +234,17 @@ public class CmOrderArchiveService extends CrudService<CmOrderArchiveDao, CmOrde
         result.put("clubName", clubName);
         return result;
     }
+
+    @Transactional(readOnly = false)
+    public String resetArchiveNo() {
+        List<CmOrderArchive> orderArchiveList = findList(new CmOrderArchive());
+        orderArchiveList.forEach(cmOrderArchive->{
+            SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
+            String date = format.format(cmOrderArchive.getAddTime());
+            String orderArchiveNo = "CM-" + date + cmOrderArchive.getShopOrderId();
+            cmOrderArchive.setArchiveNo(orderArchiveNo);
+            cmOrderArchiveDao.updateArchiveNo(cmOrderArchive);
+        });
+        return "success";
+    }
 }

+ 8 - 2
src/main/java/com/caimei/modules/archive/utils/OssArchiveUtil.java

@@ -92,12 +92,18 @@ public class OssArchiveUtil {
         if (".vsd".equalsIgnoreCase(fileExtension)) {
             return "application/vnd.visio";
         }
-        if (".ppt".equalsIgnoreCase(fileExtension) || "pptx".equalsIgnoreCase(fileExtension)) {
+        if (".ppt".equalsIgnoreCase(fileExtension)  ) {
             return "application/vnd.ms-powerpoint";
         }
-        if (".doc".equalsIgnoreCase(fileExtension) || "docx".equalsIgnoreCase(fileExtension)) {
+        if (".pptx".equalsIgnoreCase(fileExtension)) {
+            return "application/vnd.openxmlformats-officedocument.presentationml.presentation";
+        }
+        if (".doc".equalsIgnoreCase(fileExtension) ) {
             return "application/msword";
         }
+        if ("docx".equalsIgnoreCase(fileExtension)) {
+            return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
+        }
         if (".xml".equalsIgnoreCase(fileExtension)) {
             return "text/xml";
         }

+ 9 - 0
src/main/java/com/caimei/modules/archive/web/CmOrderArchiveController.java

@@ -129,4 +129,13 @@ public class CmOrderArchiveController extends BaseController {
 			e.printStackTrace();
 		}
 	}
+
+	/**
+	 * 重置订单资料编号
+	 */
+	@RequestMapping("/archiveNo/reset")
+	@ResponseBody
+	public String resetArchiveNo(){
+		return cmOrderArchiveService.resetArchiveNo();
+	}
 }

+ 0 - 2
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -10,8 +10,6 @@ import com.caimei.modules.order.utils.ProductType;
 import com.caimei.modules.product.dao.CmPromotionDao;
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.entity.CmPromotion;
-import com.caimei.utils.MathUtil;
-import com.sun.org.apache.bcel.internal.generic.NEW;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.StringUtils;

+ 1 - 1
src/main/java/com/caimei/modules/order/utils/OrderUtil.java

@@ -331,7 +331,7 @@ public class OrderUtil {
             return "建设银行6256";
         }
         if ("20".equals(payType)) {
-            return "大额银联转账";
+            return "建设银行3346";
         }
         return "";
     }

+ 84 - 88
src/main/java/com/caimei/modules/product/service/RepeatPurchasePriceService.java

@@ -23,97 +23,93 @@ import com.caimei.modules.product.dao.RepeatPurchasePriceDao;
 @Service
 @Transactional(readOnly = true)
 public class RepeatPurchasePriceService extends CrudService<RepeatPurchasePriceDao, RepeatPurchasePrice> {
-	@Autowired
-	private RepeatPurchasePriceDao repeatPurchasePriceDao;
+    @Autowired
+    private RepeatPurchasePriceDao repeatPurchasePriceDao;
 
-	@Autowired
-	private RepeatPurchasePriceHistoryDao repeatPurchasePriceHistoryDao;
+    @Autowired
+    private RepeatPurchasePriceHistoryDao repeatPurchasePriceHistoryDao;
 
 //	public RepeatPurchasePrice get(String id) {
 //		return super.get(id);
 //	}
-	
-	public List<RepeatPurchasePrice> findList(RepeatPurchasePrice repeatPurchasePrice) {
-		return super.findList(repeatPurchasePrice);
-	}
-	
-	public Page<RepeatPurchasePrice> findPage(Page<RepeatPurchasePrice> page, RepeatPurchasePrice repeatPurchasePrice) {
-		try{
-			repeatPurchasePrice.setPage(page);
-			List<RepeatPurchasePrice> list = repeatPurchasePriceDao.findList(repeatPurchasePrice);
-			if(null != list && list.size() > 0){
-				for(RepeatPurchasePrice bean:list){
-					//设置用户类型
-					String type = UserType.UserType(Integer.parseInt(bean.getType()));
-					if(UserType.isClub(Integer.parseInt(bean.getType()))){
-					    if(null != bean.getBindMobile()) bean.setMobile(bean.getBindMobile());
-                    }
-                    bean.setType(type);
-				}
-			}
-			page.setList(list);
-		}catch (Exception e){
-			e.printStackTrace();
-		}
-		return page;
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(RepeatPurchasePrice repeatPurchasePrice) {
-		super.save(repeatPurchasePrice);
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(RepeatPurchasePrice repeatPurchasePrice,RepeatPurchasePriceHistory repeatPurchasePriceHistory) {
-		repeatPurchasePrice.setDelFlag("1");
-		repeatPurchasePriceDao.delete(repeatPurchasePrice);
-		List<RepeatPurchasePriceHistory> list = repeatPurchasePriceDao.findHistoryPriceList(repeatPurchasePriceHistory);
-		for (RepeatPurchasePriceHistory purchasePriceHistory : list) {
-			purchasePriceHistory.setDelFlag("1");
-			repeatPurchasePriceHistoryDao.delete(purchasePriceHistory);
-		}
-
-	}
-
-
-	public Page<RepeatPurchasePriceHistory> findHistoryPricePage(Page<RepeatPurchasePriceHistory> page, RepeatPurchasePriceHistory repeatPurchasePriceHistory) {
-		try{
-			page.setOrderBy("createTime");
-			repeatPurchasePriceHistory.setPage(page);
-			List<RepeatPurchasePriceHistory> list = repeatPurchasePriceDao.findHistoryPriceList(repeatPurchasePriceHistory);
-			page.setList(list);
-		}catch (Exception e){
-			e.printStackTrace();
-		}
-		return page;
-	}
-
-	public RepeatPurchasePrice getRepeatPurchasePrice(Integer repeatPurchasePriceId) {
-		RepeatPurchasePrice bean = new RepeatPurchasePrice();
-		try{
-			bean =  repeatPurchasePriceDao.getRepeatPurchasePrice(repeatPurchasePriceId);
-
-		}catch (Exception e){
-			e.printStackTrace();
-		}
-		return bean;
-	}
-
-	public RepeatPurchasePrice getLastBuyPrice(Integer clubID, Integer uID, Integer productID) {
-		return repeatPurchasePriceDao.getLastBuyPrice(clubID, uID, productID);
-	}
-
-	@Transactional(readOnly = false)
-	public void insert(RepeatPurchasePrice p) {
-		repeatPurchasePriceDao.insert(p);
-	}
-
-	@Transactional(readOnly = false)
-	public void update(RepeatPurchasePrice p) {
-		repeatPurchasePriceDao.update(p);
-	}
-
-	public String findPriceProductList(Integer userId){
-		return repeatPurchasePriceDao.findPriceProductList(userId);
-	}
+
+    public List<RepeatPurchasePrice> findList(RepeatPurchasePrice repeatPurchasePrice) {
+        return super.findList(repeatPurchasePrice);
+    }
+
+    public Page<RepeatPurchasePrice> findPage(Page<RepeatPurchasePrice> page, RepeatPurchasePrice repeatPurchasePrice) {
+        repeatPurchasePrice.setPage(page);
+        List<RepeatPurchasePrice> list = repeatPurchasePriceDao.findList(repeatPurchasePrice);
+        if (null != list && list.size() > 0) {
+            for (RepeatPurchasePrice bean : list) {
+                //设置用户类型
+                String type = UserType.UserType(Integer.parseInt(bean.getType()));
+                if (UserType.isClub(Integer.parseInt(bean.getType()))) {
+                    if (null != bean.getBindMobile()) bean.setMobile(bean.getBindMobile());
+                }
+                bean.setType(type);
+            }
+        }
+        page.setList(list);
+        return page;
+    }
+
+    @Transactional(readOnly = false)
+    public void save(RepeatPurchasePrice repeatPurchasePrice) {
+        super.save(repeatPurchasePrice);
+    }
+
+    @Transactional(readOnly = false)
+    public void delete(RepeatPurchasePrice repeatPurchasePrice, RepeatPurchasePriceHistory repeatPurchasePriceHistory) {
+        repeatPurchasePrice.setDelFlag("1");
+        repeatPurchasePriceDao.delete(repeatPurchasePrice);
+        List<RepeatPurchasePriceHistory> list = repeatPurchasePriceDao.findHistoryPriceList(repeatPurchasePriceHistory);
+        for (RepeatPurchasePriceHistory purchasePriceHistory : list) {
+            purchasePriceHistory.setDelFlag("1");
+            repeatPurchasePriceHistoryDao.delete(purchasePriceHistory);
+        }
+
+    }
+
+
+    public Page<RepeatPurchasePriceHistory> findHistoryPricePage(Page<RepeatPurchasePriceHistory> page, RepeatPurchasePriceHistory repeatPurchasePriceHistory) {
+        try {
+            page.setOrderBy("createTime");
+            repeatPurchasePriceHistory.setPage(page);
+            List<RepeatPurchasePriceHistory> list = repeatPurchasePriceDao.findHistoryPriceList(repeatPurchasePriceHistory);
+            page.setList(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return page;
+    }
+
+    public RepeatPurchasePrice getRepeatPurchasePrice(Integer repeatPurchasePriceId) {
+        RepeatPurchasePrice bean = new RepeatPurchasePrice();
+        try {
+            bean = repeatPurchasePriceDao.getRepeatPurchasePrice(repeatPurchasePriceId);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return bean;
+    }
+
+    public RepeatPurchasePrice getLastBuyPrice(Integer clubID, Integer uID, Integer productID) {
+        return repeatPurchasePriceDao.getLastBuyPrice(clubID, uID, productID);
+    }
+
+    @Transactional(readOnly = false)
+    public void insert(RepeatPurchasePrice p) {
+        repeatPurchasePriceDao.insert(p);
+    }
+
+    @Transactional(readOnly = false)
+    public void update(RepeatPurchasePrice p) {
+        repeatPurchasePriceDao.update(p);
+    }
+
+    public String findPriceProductList(Integer userId) {
+        return repeatPurchasePriceDao.findPriceProductList(userId);
+    }
 }

+ 78 - 14
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -4,9 +4,8 @@ import com.caimei.constants.ShopStatus;
 import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.sys.utils.CmMsgUtils;
 import com.caimei.modules.sys.utils.SMSUtils;
-import com.caimei.modules.user.aop.OperationLogAnnotation;
-import com.caimei.modules.user.aop.OperationLogShop;
 import com.caimei.modules.user.dao.CmUserDao;
+import com.caimei.modules.user.dao.NewCmShopDao;
 import com.caimei.modules.user.entity.CmMessage;
 import com.caimei.modules.user.entity.CmOperationUser;
 import com.caimei.modules.user.entity.CmUser;
@@ -64,12 +63,16 @@ public class NewCmShopController extends BaseController {
     private CmOperationUserService cmOperationUserService;
     @Autowired
     private CmUserDao cmUserDao;
+    @Autowired
+    private NewCmShopDao newCmShopDao;
+
 
     public static NewCmShop newcm;
     public static CmUser cmus;
     public static int id;
     public static String auditNo;
 
+
     @ModelAttribute
     public NewCmShop get(@RequestParam(required = false) String id) {
         NewCmShop entity = null;
@@ -91,19 +94,90 @@ public class NewCmShopController extends BaseController {
         if (null != newCmShop.getEndTime() && !"".equals(newCmShop.getEndTime()) && !newCmShop.getEndTime().endsWith("23:59:59")) {
             newCmShop.setEndTime(newCmShop.getEndTime() + " 23:59:59");
         }
+        //屏蔽特殊供应商
+        newCmShop.setShopType(1);
         Page<NewCmShop> page = newCmShopService.findPage(new Page<NewCmShop>(request, response), newCmShop);
         newcm = newCmShop;
-        logger.info("******输出page"+page.getList()+"*****"+newCmShop.getSname());
         model.addAttribute("page", page);
         return "modules/user/newCmShopList";
     }
 
+    @RequestMapping(value = "/special/new")
+    public String specialList(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //新品供应商
+        newCmShop.setShopType(2);
+        Page<NewCmShop> page = newCmShopService.findPage(new Page<NewCmShop>(request, response), newCmShop);
+        model.addAttribute("page", page);
+        model.addAttribute("newCmShop",newCmShop);
+        model.addAttribute("shopType",2);
+        return "modules/user/cmNewProductShopList";
+    }
+
+    @RequestMapping(value = "/special/new/edit")
+    public String specialEdit(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(null!=newCmShop.getShopID()){
+            newCmShop.setSplitCodes(newCmShopDao.findSplitCode(newCmShop.getShopID()));
+        }
+        model.addAttribute("newCmShop",newCmShop);
+        return "modules/user/cmNewProductShopEdit";
+    }
+
+    @RequestMapping(value = "/special/new/save")
+    public String specialSave(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        newCmShopService.saveSpecial(newCmShop);
+        if(2==newCmShop.getShopType()){
+            model.addAttribute("newCmShop",newCmShop);
+            model.addAttribute("shopType",2);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/new?repage";
+        }else{
+            model.addAttribute("newCmShop",newCmShop);
+            model.addAttribute("shopType",3);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/second?repage";
+        }
+    }
+
+    @RequestMapping(value = "/special/offline")
+    public String specialOffline(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //下线
+        newCmShopService.offline(newCmShop);
+        if(2==newCmShop.getShopType()){
+            model.addAttribute("shopType",2);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/new?repage";
+        }else{
+            model.addAttribute("shopType",3);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/second?repage";
+        }
+    }
+
+    @RequestMapping(value = "/special/online")
+    public String specialOnline(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //上线
+        newCmShopService.online(newCmShop);
+        if(2==newCmShop.getShopType()){
+            model.addAttribute("shopType",2);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/new?repage";
+        }else{
+            model.addAttribute("shopType",3);
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/special/second?repage";
+        }
+    }
+
+    @RequestMapping(value = "/special/second")
+    public String secondList(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //二手供应商
+        newCmShop.setShopType(3);
+        Page<NewCmShop> page = newCmShopService.findPage(new Page<NewCmShop>(request, response), newCmShop);
+        model.addAttribute("page", page);
+        model.addAttribute("shopType",3);
+        model.addAttribute("newCmShop",newCmShop);
+        return "modules/user/cmNewProductShopList";
+    }
+
     @RequiresPermissions("user:newCmShop:view")
     @RequestMapping(value = "form")
     public String form(NewCmShop newCmShop, Model model) {
         //获取供应商证书信息
         newCmShop = newCmShopService.getShopcert(newCmShop);
-        newcm = newCmShop;
         model.addAttribute("newCmShop", newCmShop);
         return "modules/user/newCmShopForm";
     }
@@ -118,7 +192,6 @@ public class NewCmShopController extends BaseController {
      */
     @ResponseBody
     @RequiresPermissions("user:newCmShop:view")
-    @OperationLogShop(operType = "审核")
     @RequestMapping(value = "auditShopInfo")
     public Map<String, Object> auditShopInfo(String auditStatus, Integer shopId, Integer userId, String auditNote, Model model) {
         Map<String, Object> map = new HashedMap();
@@ -129,7 +202,6 @@ public class NewCmShopController extends BaseController {
             String manufacturerStatus = "";
             String smsMessage = "";
             CmUser companyUser = cmUserService.get(userId + "");
-            cmus = companyUser;
             String mobile = companyUser.getBindMobile();
             if (StringUtils.equals("1", auditStatus)) {
                 manufacturerStatus = "90";
@@ -139,7 +211,6 @@ public class NewCmShopController extends BaseController {
                 manufacturerStatus = "92";
                 smsMessage = "很遗憾,您的资料信息有误,未通过审核,请登录采美修改资料信息。";
             }
-            auditNo = auditStatus;
             // 更新用户信息
             newCmShopService.updateUserAudit(auditStatus, auditNote, format, manufacturerStatus, userId, "1");
             // 更新供应商信息
@@ -304,7 +375,6 @@ public class NewCmShopController extends BaseController {
      */
     @RequiresPermissions("user:newCmShop:edit")
     @ResponseBody
-    @OperationLogShop(operType = "修改密码", operModul = "修改密码")
     @RequestMapping(value = "updatePwd")
     public Map<String, Object> updatePwd(String password, String id, HttpServletRequest request, HttpServletResponse response) {
         Map<String, Object> map = Maps.newLinkedHashMap();
@@ -312,7 +382,6 @@ public class NewCmShopController extends BaseController {
             CmUser cmUser = cmUserService.get(id);
             cmUser.setPassword(MD5Util.MD5(password));
             cmUserService.update(cmUser);
-            cmus = cmUser;
             map.put("success", true);
             map.put("msg", "修改成功");
         } catch (Exception e) {
@@ -382,13 +451,11 @@ public class NewCmShopController extends BaseController {
      * @return
      */
     @RequestMapping(value = "online")
-    @OperationLogShop(operType = "更改状态", operModul = "设置为上线")
     @RequiresPermissions("user:newCmShop:edit")
     public String onLine(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
         Integer userID = newCmShop.getUserID();
         cmUserService.updateUserStatus("90", userID, "1");
         newCmShopService.updateShopStatus("90", userID);
-        id = newCmShop.getUserID();
         addMessage(redirectAttributes, "供应商上线成功");
         return "redirect:" + Global.getAdminPath() + "/user/newCmShop/";
     }
@@ -402,20 +469,17 @@ public class NewCmShopController extends BaseController {
      * @return
      */
     @RequestMapping(value = "offline")
-    @OperationLogShop(operType = "更改状态", operModul = "设置为下线")
     @RequiresPermissions("user:newCmShop:edit")
     public String offLine(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
         Integer userID = newCmShop.getUserID();
         cmUserService.updateUserStatus("91", userID, "0");
         newCmShopService.updateShopStatus("91", userID);
-        id = newCmShop.getUserID();
         addMessage(redirectAttributes, "供应商下线成功");
         return "redirect:" + Global.getAdminPath() + "/user/newCmShop/";
     }
 
 
     @RequiresPermissions("user:newCmShop:edit")
-    @OperationLogShop(operType = "编辑")
     @RequestMapping(value = "save")
     public String save(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
         if (!beanValidator(model, newCmShop)) {

+ 7 - 1
src/main/resources/mappings/modules/archive/CmOrderArchiveMapper.xml

@@ -208,7 +208,10 @@
 
     <update id="update">
         UPDATE cm_order_archive
-        SET archiveNo   = #{archiveNo},
+        SET
+            <if test="updateShopOrderIdFlag != null and  1 == updateShopOrderIdFlag">
+                archiveNo = #{archiveNo},
+            </if>
             title       = #{title},
             shopOrderId = #{shopOrderId},
             shopName    = #{shopName},
@@ -223,6 +226,9 @@
         set orderArchiveId = #{orderArchiveId}
         where id = #{fileId}
     </update>
+    <update id="updateArchiveNo">
+        update cm_order_archive set archiveNo = #{archiveNo} where id = #{id}
+    </update>
 
     <delete id="delete">
         DELETE

+ 1 - 2
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -1133,11 +1133,10 @@
         WHERE orderId = #{orderid}
     </select>
 
-    <select id="promotionFull" resultMap="java.lang.Double">
+    <select id="promotionFull" resultType="java.lang.Double">
         SELECT promotionFullReduction
         FROM `cm_order`
         WHERE orderId = #{orderid}
-
     </select>
 
 </mapper>

+ 2 - 8
src/main/resources/mappings/modules/product/RepeatPurchasePriceMapper.xml

@@ -55,7 +55,7 @@
 			c.name AS "userName",
 			c.mobile As "mobile",
 			c.bindMobile AS "bindMobile",
-			ifnull(c.registerUserTypeID,3) As "type",
+			IFNULL(c.registerUserTypeID,3) As "type",
 			b.name AS "productName",
             CASE   b.costCheckFlag
             WHEN  1 THEN b.`costPrice`
@@ -91,13 +91,7 @@
 			AND a.delFlag = 0
 			and b.productCategory = 1
 		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy} desc
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
+			ORDER BY a.createTime DESC
 	</select>
 
 

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/archive/cmOrderArchiveFileList.jsp

@@ -100,7 +100,7 @@
                 <fmt:formatDate value="${cmOrderArchiveFile.uploadTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
             </td>
             <td>
-                <a onclick="previewFile('${cmOrderArchiveFile.ossUrl}')" target="_blank">预览</a>
+                <a href="javascript:;" onclick="previewFile('${cmOrderArchiveFile.ossUrl}')" target="_blank">预览</a>
                 <a href="${ctx}/archive/cmOrderArchive/downFile?fileId=${cmOrderArchiveFile.id}">下载</a>
             </td>
         </tr>

+ 2 - 0
src/main/webapp/WEB-INF/views/modules/archive/cmOrderArchiveForm.jsp

@@ -51,6 +51,8 @@
 					if (result.code == 0) {
 						$("#clubName").val(result.clubName);
 						$("#shopName").val(result.shopName);
+					} else {
+						jBox.tip(result.msg, "error");
 					}
 				});
 			}