Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserShopMsgMapper.java # src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserShopMsg.java # src/main/resources/mapper/TbUserShopMsgMapper.xml
This commit is contained in:
commit
dbfd971f26
|
|
@ -29,6 +29,7 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@RestController
|
@RestController
|
||||||
|
|
@ -60,32 +61,18 @@ public class LoginContoller {
|
||||||
RedisUtil redisUtil;
|
RedisUtil redisUtil;
|
||||||
|
|
||||||
|
|
||||||
// @RequestMapping("/wx/business/login")
|
@RequestMapping("/wx/business/login")
|
||||||
public Result wxBusinessLogin(@RequestParam(value = "code", required = false) String code,
|
public Result wxBusinessLogin(@RequestParam(value = "code", required = false) String code,
|
||||||
@RequestParam(value = "rawData", required = false) String rawData,
|
@RequestParam(value = "shopId", required = false) String shopId
|
||||||
@RequestParam(value = "signature", required = false) String signature
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
// 用户非敏感信息:rawData
|
|
||||||
// 签名:signature
|
|
||||||
JSONObject rawDataJson = JSON.parseObject(rawData);
|
|
||||||
// 1.接收小程序发送的code
|
|
||||||
// 2.开发者服务器 登录凭证校验接口 appi + appsecret + code
|
|
||||||
JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, businessAppId, businessSecrete);
|
JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, businessAppId, businessSecrete);
|
||||||
// 3.接收微信接口服务 获取返回的参数
|
|
||||||
String openid = SessionKeyOpenId.getString("openid");
|
String openid = SessionKeyOpenId.getString("openid");
|
||||||
String sessionKey = SessionKeyOpenId.getString("session_key");
|
if(Objects.isNull(openid)){
|
||||||
|
return Result.fail("获取微信id失败");
|
||||||
// 4.校验签名 小程序发送的签名signature与服务器端生成的签名signature2 = sha1(rawData + sessionKey)
|
|
||||||
String signature2 = DigestUtils.sha1Hex(rawData + sessionKey);
|
|
||||||
if (!signature.equals(signature2)) {
|
|
||||||
return Result.fail("签名校验失败");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return loginService.wxBusinessLogin(openid,shopId);
|
||||||
return Result.success(CodeEnum.ENCRYPT);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -148,4 +148,10 @@ public class UserContoller {
|
||||||
// String userSign = jsonObject.getString("userSign");
|
// String userSign = jsonObject.getString("userSign");
|
||||||
return userService.userAll(integralFlowVo,"userSign");
|
return userService.userAll(integralFlowVo,"userSign");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.chaozhanggui.system.cashierservice.dao;
|
||||||
|
|
||||||
import com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg;
|
import com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
|
|
@ -9,7 +11,10 @@ import org.apache.ibatis.annotations.Select;
|
||||||
* @createDate 2024-06-28 09:55:30
|
* @createDate 2024-06-28 09:55:30
|
||||||
* @Entity com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg
|
* @Entity com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg
|
||||||
*/
|
*/
|
||||||
|
@Component
|
||||||
|
@Mapper
|
||||||
public interface TbUserShopMsgMapper {
|
public interface TbUserShopMsgMapper {
|
||||||
|
int deleteByPrimaryKey(Integer shopId);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long id);
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
|
@ -17,12 +22,11 @@ public interface TbUserShopMsgMapper {
|
||||||
|
|
||||||
int insertSelective(TbUserShopMsg record);
|
int insertSelective(TbUserShopMsg record);
|
||||||
|
|
||||||
|
TbUserShopMsg selectByPrimaryKey(Integer shopId);
|
||||||
TbUserShopMsg selectByPrimaryKey(Long id);
|
TbUserShopMsg selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbUserShopMsg record);
|
int updateByPrimaryKeySelective(TbUserShopMsg record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TbUserShopMsg record);
|
int updateByPrimaryKey(TbUserShopMsg record);
|
||||||
|
|
||||||
@Select("select * from tb_user_shop_msg where shop_id=#{shopId}")
|
|
||||||
TbUserShopMsg selectByShopId(String shopId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,93 +2,67 @@ package com.chaozhanggui.system.cashierservice.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @TableName tb_user_shop_msg
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class TbUserShopMsg implements Serializable {
|
public class TbUserShopMsg implements Serializable {
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private String openId;
|
private String openId;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 1 正常 0 禁用
|
|
||||||
*/
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
public Integer getShopId() {
|
||||||
public boolean equals(Object that) {
|
return shopId;
|
||||||
if (this == that) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (that == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (getClass() != that.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
TbUserShopMsg other = (TbUserShopMsg) that;
|
|
||||||
return (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
|
|
||||||
&& (this.getOpenId() == null ? other.getOpenId() == null : this.getOpenId().equals(other.getOpenId()))
|
|
||||||
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
|
|
||||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
|
||||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
|
||||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void setShopId(Integer shopId) {
|
||||||
public int hashCode() {
|
this.shopId = shopId;
|
||||||
final int prime = 31;
|
|
||||||
int result = 1;
|
|
||||||
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
|
|
||||||
result = prime * result + ((getOpenId() == null) ? 0 : getOpenId().hashCode());
|
|
||||||
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
|
|
||||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
|
||||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
|
||||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public String getOpenId() {
|
||||||
public String toString() {
|
return openId;
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(getClass().getSimpleName());
|
|
||||||
sb.append(" [");
|
|
||||||
sb.append("Hash = ").append(hashCode());
|
|
||||||
sb.append(", shopId=").append(shopId);
|
|
||||||
sb.append(", openId=").append(openId);
|
|
||||||
sb.append(", remark=").append(remark);
|
|
||||||
sb.append(", status=").append(status);
|
|
||||||
sb.append(", createTime=").append(createTime);
|
|
||||||
sb.append(", updateTime=").append(updateTime);
|
|
||||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
||||||
sb.append("]");
|
|
||||||
return sb.toString();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void setOpenId(String openId) {
|
||||||
|
this.openId = openId == null ? null : openId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark == null ? null : remark.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status == null ? null : status.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,4 +114,22 @@ public class RabbitConfig {
|
||||||
public Binding bindingcons_Register() {
|
public Binding bindingcons_Register() {
|
||||||
return BindingBuilder.bind(queuePrint_Register()).to(printExchange_Register()).with(RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT);
|
return BindingBuilder.bind(queuePrint_Register()).to(printExchange_Register()).with(RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public DirectExchange cons_msg_Exchange_Register() {
|
||||||
|
return new DirectExchange(RabbitConstants.CONS_MSG_COLLECT_PUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Queue queuecons_msg_Register() {
|
||||||
|
return new Queue(RabbitConstants.CONS_MSG_COLLECT_QUEUE_PUT, true); //队列持久
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Binding bindingcons_msg_Register() {
|
||||||
|
return BindingBuilder.bind(queuePrint_Register()).to(printExchange_Register()).with(RabbitConstants.CONS_MSG_COLLECT_ROUTINGKEY_PUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -49,4 +49,14 @@ public interface RabbitConstants {
|
||||||
|
|
||||||
|
|
||||||
public static final String CONS_COLLECT_ROUTINGKEY_PUT = "cons_collect_routingkey_put";
|
public static final String CONS_COLLECT_ROUTINGKEY_PUT = "cons_collect_routingkey_put";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CONS_MSG_COLLECT_PUT="cons_msg_collect_put";
|
||||||
|
|
||||||
|
public static final String CONS_MSG_COLLECT_QUEUE_PUT = "cons_msg_collect_queue_put";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CONS_MSG_COLLECT_ROUTINGKEY_PUT = "cons_msg_collect_routingkey_put";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,10 @@ public class RabbitProducer implements RabbitTemplate.ConfirmCallback {
|
||||||
rabbitTemplate.convertAndSend(RabbitConstants.CONS_COLLECT_PUT, RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT, content, correlationId);
|
rabbitTemplate.convertAndSend(RabbitConstants.CONS_COLLECT_PUT, RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT, content, correlationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void con_msg(String content){
|
||||||
|
CorrelationData correlationId = new CorrelationData(UUID.randomUUID().toString());
|
||||||
|
rabbitTemplate.convertAndSend(RabbitConstants.CONS_MSG_COLLECT_PUT, RabbitConstants.CONS_MSG_COLLECT_ROUTINGKEY_PUT, content, correlationId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
|
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,16 @@ public class CartService {
|
||||||
TbProductSkuWithBLOBs tbProductSkuWithBLOBs = productSkuMapper.selectByPrimaryKey(Integer.valueOf(skuId));
|
TbProductSkuWithBLOBs tbProductSkuWithBLOBs = productSkuMapper.selectByPrimaryKey(Integer.valueOf(skuId));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JSONObject objectMsg=new JSONObject();
|
||||||
|
objectMsg.put("skuId",tbProductSkuWithBLOBs.getId());
|
||||||
|
objectMsg.put("shopId",Integer.valueOf(shopId));
|
||||||
|
|
||||||
|
|
||||||
|
producer.con_msg(objectMsg.toString());
|
||||||
|
|
||||||
|
|
||||||
if (Integer.valueOf(tbProduct.getIsPauseSale()).equals(1)) {
|
if (Integer.valueOf(tbProduct.getIsPauseSale()).equals(1)) {
|
||||||
JSONObject jsonObject1 = new JSONObject();
|
JSONObject jsonObject1 = new JSONObject();
|
||||||
jsonObject1.put("status", "fail");
|
jsonObject1.put("status", "fail");
|
||||||
|
|
@ -149,6 +159,11 @@ public class CartService {
|
||||||
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":product" + productId, tbProduct.getStockNumber() + "");
|
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":product" + productId, tbProduct.getStockNumber() + "");
|
||||||
}
|
}
|
||||||
skuNum = redisUtil.getMessage(RedisCst.PRODUCT + shopId + ":product" + productId);
|
skuNum = redisUtil.getMessage(RedisCst.PRODUCT + shopId + ":product" + productId);
|
||||||
|
|
||||||
|
if (!skuNum.equals(tbProduct.getStockNumber() + "")) {
|
||||||
|
skuNum = tbProduct.getStockNumber() + "";
|
||||||
|
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":product" + productId, skuNum);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
boolean exist = redisUtil.exists(RedisCst.PRODUCT + shopId + ":" + skuId);
|
boolean exist = redisUtil.exists(RedisCst.PRODUCT + shopId + ":" + skuId);
|
||||||
if (!exist) {
|
if (!exist) {
|
||||||
|
|
@ -156,6 +171,11 @@ public class CartService {
|
||||||
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":" + skuId, Math.round(stock) + "");
|
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":" + skuId, Math.round(stock) + "");
|
||||||
}
|
}
|
||||||
skuNum = redisUtil.getMessage(RedisCst.PRODUCT + shopId + ":" + skuId);
|
skuNum = redisUtil.getMessage(RedisCst.PRODUCT + shopId + ":" + skuId);
|
||||||
|
|
||||||
|
if (!skuNum.equals(Math.round(tbProductSkuWithBLOBs.getStockNumber()) + "")) {
|
||||||
|
skuNum = Math.round(tbProductSkuWithBLOBs.getStockNumber()) + "";
|
||||||
|
redisUtil.saveMessage(RedisCst.PRODUCT + shopId + ":product" + productId, skuNum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer buyNum = jsonObject.getInteger("num");
|
Integer buyNum = jsonObject.getInteger("num");
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,34 @@ public class LoginService {
|
||||||
RedisUtil redisUtil;
|
RedisUtil redisUtil;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TbUserShopMsgMapper tbUserShopMsgMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Result wxBusinessLogin(String openId,String shopId){
|
||||||
|
TbUserShopMsg shopMsg= tbUserShopMsgMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||||
|
if(Objects.isNull(shopMsg)){
|
||||||
|
shopMsg=new TbUserShopMsg();
|
||||||
|
|
||||||
|
shopMsg.setShopId(Integer.valueOf(shopId));
|
||||||
|
shopMsg.setOpenId(openId);
|
||||||
|
shopMsg.setCreateTime(new Date());
|
||||||
|
shopMsg.setStatus("1");
|
||||||
|
tbUserShopMsgMapper.insert(shopMsg);
|
||||||
|
}else {
|
||||||
|
shopMsg.setOpenId(openId);
|
||||||
|
shopMsg.setUpdateTime(new Date());
|
||||||
|
tbUserShopMsgMapper.updateByPrimaryKey(shopMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.success(CodeEnum.SUCCESS,shopMsg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result wxCustomLogin(String openId, String headImage, String nickName, String telephone, String ip) throws Exception {
|
public Result wxCustomLogin(String openId, String headImage, String nickName, String telephone, String ip) throws Exception {
|
||||||
TbUserInfo userInfo = new TbUserInfo();
|
TbUserInfo userInfo = new TbUserInfo();
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class FeieyunPrintUtil {
|
public class FeieyunPrintUtil {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,10 @@ public class PrinterUtils {
|
||||||
|
|
||||||
sb.append("<C><B>"+detailPO.getMerchantName()+"</B></C><BR><BR>");
|
sb.append("<C><B>"+detailPO.getMerchantName()+"</B></C><BR><BR>");
|
||||||
sb.append("<C><BOLD>"+type+"【"+detailPO.getMasterId()+"】</BOLD></C><BR><BR>");
|
sb.append("<C><BOLD>"+type+"【"+detailPO.getMasterId()+"】</BOLD></C><BR><BR>");
|
||||||
sb.append("<CB><BOLD>"+detailPO.getOutNumber()+"</BOLD></CB><BR><BR>");
|
if(Objects.nonNull(detailPO.getOutNumber())){
|
||||||
|
sb.append("<CB><BOLD>"+detailPO.getOutNumber()+"</BOLD></CB><BR><BR>");
|
||||||
|
}
|
||||||
|
|
||||||
sb.append("<S><L>订单号: "+detailPO.getOrderNo()+" </L></S><BR>");
|
sb.append("<S><L>订单号: "+detailPO.getOrderNo()+" </L></S><BR>");
|
||||||
sb.append("<S><L>交易时间: "+detailPO.getTradeDate()+" </L></S><BR>");
|
sb.append("<S><L>交易时间: "+detailPO.getTradeDate()+" </L></S><BR>");
|
||||||
sb.append("<S><L>收银员: "+detailPO.getOperator()+" </L></S><BR><BR><BR>");
|
sb.append("<S><L>收银员: "+detailPO.getOperator()+" </L></S><BR><BR><BR>");
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ server:
|
||||||
port: 9888
|
port: 9888
|
||||||
prod: dev1
|
prod: dev1
|
||||||
queue: cart_queue_putdev1
|
queue: cart_queue_putdev1
|
||||||
|
subscribe:
|
||||||
|
message:
|
||||||
|
miniprogramState: trial
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,9 @@ thirdPay:
|
||||||
callFSTBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/notifyfstCallBack
|
callFSTBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/notifyfstCallBack
|
||||||
prod: prod1
|
prod: prod1
|
||||||
queue: cart_queue_putprod1
|
queue: cart_queue_putprod1
|
||||||
|
subscribe:
|
||||||
|
message:
|
||||||
|
miniprogramState: formal
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ server:
|
||||||
wx:
|
wx:
|
||||||
login:
|
login:
|
||||||
business:
|
business:
|
||||||
appId:
|
appId: wxcf0fe8cdba153fd6
|
||||||
secrete:
|
secrete: c33e06467c6879a62af633d50ed6b720
|
||||||
custom:
|
custom:
|
||||||
appId: wxd88fffa983758a30
|
appId: wxd88fffa983758a30
|
||||||
secrete: a34a61adc0602118b49400baa8812454
|
secrete: a34a61adc0602118b49400baa8812454
|
||||||
|
|
|
||||||
|
|
@ -915,7 +915,7 @@
|
||||||
|
|
||||||
<update id="updateStockById">
|
<update id="updateStockById">
|
||||||
update tb_product
|
update tb_product
|
||||||
set stock_number = stock_number - #{number,jdbcType=INTEGER}
|
set stock_number = stock_number - #{num,jdbcType=INTEGER}
|
||||||
where id = #{productId}
|
where id = #{productId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,91 +1,106 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbUserShopMsgMapper">
|
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbUserShopMsgMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
||||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
<id column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||||
<id property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
<result column="open_id" jdbcType="VARCHAR" property="openId" />
|
||||||
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
||||||
</resultMap>
|
<sql id="Base_Column_List">
|
||||||
|
shop_id, open_id, remark, status, create_time, update_time
|
||||||
<sql id="Base_Column_List">
|
</sql>
|
||||||
shop_id,open_id,remark,
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
status,create_time,update_time
|
select
|
||||||
</sql>
|
<include refid="Base_Column_List" />
|
||||||
|
from tb_user_shop_msg
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
||||||
select
|
</select>
|
||||||
<include refid="Base_Column_List" />
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
from tb_user_shop_msg
|
delete from tb_user_shop_msg
|
||||||
where shop_id = #{shopId,jdbcType=INTEGER}
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
||||||
</select>
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
insert into tb_user_shop_msg (shop_id, open_id, remark,
|
||||||
delete from tb_user_shop_msg
|
status, create_time, update_time
|
||||||
where shop_id = #{shopId,jdbcType=INTEGER}
|
)
|
||||||
</delete>
|
values (#{shopId,jdbcType=INTEGER}, #{openId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||||
<insert id="insert" keyColumn="shop_id" keyProperty="shopId" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg" useGeneratedKeys="true">
|
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||||
insert into tb_user_shop_msg
|
)
|
||||||
( shop_id,open_id,remark
|
</insert>
|
||||||
,status,create_time,update_time
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
||||||
)
|
insert into tb_user_shop_msg
|
||||||
values (#{shopId,jdbcType=INTEGER},#{openId,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR}
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
,#{status,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}
|
<if test="shopId != null">
|
||||||
)
|
shop_id,
|
||||||
</insert>
|
</if>
|
||||||
<insert id="insertSelective" keyColumn="shop_id" keyProperty="shopId" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg" useGeneratedKeys="true">
|
<if test="openId != null">
|
||||||
insert into tb_user_shop_msg
|
open_id,
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
</if>
|
||||||
<if test="shopId != null">shop_id,</if>
|
<if test="remark != null">
|
||||||
<if test="openId != null">open_id,</if>
|
remark,
|
||||||
<if test="remark != null">remark,</if>
|
</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">
|
||||||
<if test="createTime != null">create_time,</if>
|
status,
|
||||||
<if test="updateTime != null">update_time,</if>
|
</if>
|
||||||
</trim>
|
<if test="createTime != null">
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
create_time,
|
||||||
<if test="shopId != null">#{shopId,jdbcType=INTEGER},</if>
|
</if>
|
||||||
<if test="openId != null">#{openId,jdbcType=VARCHAR},</if>
|
<if test="updateTime != null">
|
||||||
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
|
update_time,
|
||||||
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
|
</if>
|
||||||
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
||||||
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
</trim>
|
<if test="shopId != null">
|
||||||
</insert>
|
#{shopId,jdbcType=INTEGER},
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
</if>
|
||||||
update tb_user_shop_msg
|
<if test="openId != null">
|
||||||
<set>
|
#{openId,jdbcType=VARCHAR},
|
||||||
<if test="openId != null">
|
</if>
|
||||||
open_id = #{openId,jdbcType=VARCHAR},
|
<if test="remark != null">
|
||||||
</if>
|
#{remark,jdbcType=VARCHAR},
|
||||||
<if test="remark != null">
|
</if>
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
<if test="status != null">
|
||||||
</if>
|
#{status,jdbcType=VARCHAR},
|
||||||
<if test="status != null">
|
</if>
|
||||||
status = #{status,jdbcType=VARCHAR},
|
<if test="createTime != null">
|
||||||
</if>
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
<if test="createTime != null">
|
</if>
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
<if test="updateTime != null">
|
||||||
</if>
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
<if test="updateTime != null">
|
</if>
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</trim>
|
||||||
</if>
|
</insert>
|
||||||
</set>
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
||||||
where shop_id = #{shopId,jdbcType=INTEGER}
|
update tb_user_shop_msg
|
||||||
</update>
|
<set>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
<if test="openId != null">
|
||||||
update tb_user_shop_msg
|
open_id = #{openId,jdbcType=VARCHAR},
|
||||||
set
|
</if>
|
||||||
open_id = #{openId,jdbcType=VARCHAR},
|
<if test="remark != null">
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
status = #{status,jdbcType=VARCHAR},
|
</if>
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
<if test="status != null">
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
status = #{status,jdbcType=VARCHAR},
|
||||||
where shop_id = #{shopId,jdbcType=INTEGER}
|
</if>
|
||||||
</update>
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
|
||||||
|
update tb_user_shop_msg
|
||||||
|
set open_id = #{openId,jdbcType=VARCHAR},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue