diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..35555bf --- /dev/null +++ b/pom.xml @@ -0,0 +1,262 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.7.3 + + + com.chaozhangui.system.cashservice + cashier-client + 1.0.0 + + + 8 + 8 + UTF-8 + + + + + + org.apache.commons + commons-lang3 + + + + commons-io + commons-io + 2.4 + + + + + org.apache.httpcomponents + httpclient + + + + org.springframework.boot + spring-boot-starter-web + 2.4.0 + + + cn.hutool + hutool-all + 4.5.18 + + + com.alibaba + fastjson + 1.2.9 + + + org.projectlombok + lombok + + + + org.apache.commons + commons-lang3 + + + + commons-beanutils + commons-beanutils + 1.9.4 + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.1 + + + org.mybatis.generator + mybatis-generator-core + 1.3.5 + + + + org.springframework.boot + spring-boot-starter-validation + + + mysql + mysql-connector-java + runtime + + + + + org.apache.commons + commons-lang3 + 3.5 + + + + org.aspectj + aspectjweaver + 1.9.5 + + + + org.springframework.boot + spring-boot-starter-webflux + + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + org.springframework.boot + spring-boot-starter-redis + 1.4.7.RELEASE + + + + redis.clients + jedis + + + org.springframework.data + spring-data-redis + + + + + com.google.guava + guava + 20.0 + + + + org.apache.commons + commons-lang3 + 3.6 + + + org.apache.httpcomponents + httpclient + 4.5.2 + + + + org.apache.httpcomponents + httpmime + 4.5.2 + + + + com.alibaba + fastjson + 1.2.48 + + + + org.apache.httpcomponents + httpclient + 4.5.2 + + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.5 + + + org.springframework.boot + spring-boot-starter-amqp + 1.5.2.RELEASE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + UTF-8 + 1.8 + 1.8 + + + + org.springframework.boot + spring-boot-maven-plugin + 1.4.2.RELEASE + + com.chaozhanggui.system.cashierservice.Shell + ./ + true + true + + + + + repackage + + + + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + + false + + false + + src/main/resources/generator-mapper/generatorConfig.xml + + + + mysql + mysql-connector-java + 8.0.17 + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java b/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java new file mode 100644 index 0000000..12c43be --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/Shell.java @@ -0,0 +1,55 @@ +package com.chaozhanggui.system.cashierservice; + + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.CommandLineRunner; +import org.springframework.context.ApplicationContext; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.web.client.RestTemplate; + +@SpringBootApplication +@EnableScheduling +@EntityScan(basePackageClasses = {Shell.class}) +@MapperScan(basePackageClasses ={Shell.class} ) +@ComponentScan(basePackageClasses ={Shell.class}) +@EnableAspectJAutoProxy(proxyTargetClass = true) +@Slf4j +public class Shell { + + private static Logger logger = LoggerFactory.getLogger(Shell.class); + + public static void main(String[] args) { + SpringApplication springApplication = new SpringApplication(Shell.class); + springApplication.run(args); + } + @Bean + RestTemplate restTemplate(){ + return new RestTemplate(); + } + + @Bean + public CommandLineRunner commandLineRunner(ApplicationContext ctx) { + return (args) -> { + logger.info("=========================启动完成=========================="); + }; + } + + + @Bean + public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() { + PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); + propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(true); + return propertySourcesPlaceholderConfigurer; + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/annotation/OpLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/annotation/OpLog.java new file mode 100644 index 0000000..1d443bb --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/annotation/OpLog.java @@ -0,0 +1,32 @@ +package com.chaozhanggui.system.cashierservice.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author DJH + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface OpLog { + + /** + * 操作日志code + * @return 操作code + */ + String opCode() default ""; + + /** + * 操作日志-详情 + * @return 操作详情 + */ + String opDetail() default ""; + + /** + * 操作日志名称 + * @return 操作名称 + */ + String opName() default ""; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/annotation/ResultCode.java b/src/main/java/com/chaozhanggui/system/cashierservice/annotation/ResultCode.java new file mode 100644 index 0000000..b54f9b3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/annotation/ResultCode.java @@ -0,0 +1,41 @@ +package com.chaozhanggui.system.cashierservice.annotation; + +/** + * 响应码枚举,参考HTTP状态码的语义 + */ +public enum ResultCode { + //成功 + SUCCESS(200), + //失败 + FAIL(400), + //未认证(签名错误) + UNAUTHORIZED(401), + //未认证(签名错误) + PARAM_ERROR(422), + // 403 + FORBIDDEN(403), + //接口不存在 + NOT_FOUND(404), + //服务器内部错误 + INTERNAL_SERVER_ERROR(500), + // 服务不可达 + SERVICE_UNAVAILABLE(503), + //未认证(签名错误) + NOT_TOKEN(401), + //无数据 + UNDEFINDE(201), + /** + * 交易未知 查询交易结果 + */ + TRANSUNKNOW(202); + + private final int code; + + ResultCode(int code) { + this.code = code; + } + + public int code() { + return code; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/cache/DataCache.java b/src/main/java/com/chaozhanggui/system/cashierservice/cache/DataCache.java new file mode 100644 index 0000000..daedf69 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/cache/DataCache.java @@ -0,0 +1,176 @@ +package com.chaozhanggui.system.cashierservice.cache; + +import cn.hutool.core.util.ObjectUtil; +import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper; +import com.chaozhanggui.system.cashierservice.dao.TbShopOnlineMapper; +import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; +import com.chaozhanggui.system.cashierservice.entity.TbShopOnline; +import com.chaozhanggui.system.cashierservice.util.DateUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.text.ParseException; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; + +@Component +@Slf4j +public class DataCache { + + + + + + @Autowired + private TbShopInfoMapper tbShopInfoMapper; + + @Autowired + TbShopOnlineMapper tbShopOnlineMapper; + + + + public static ConcurrentHashMap concurrentHashMap=new ConcurrentHashMap<>(); + + + + @Bean + public void init(){ + log.info("加载店铺信息"); + shopInfo(); + } + + + public void shopInfo(){ + List tbShopInfos= tbShopInfoMapper.selectAll(); + if(ObjectUtil.isNotEmpty(tbShopInfos)&&tbShopInfos.size()>0){ + tbShopInfos.parallelStream().forEach(it->{ + TbShopOnline online= tbShopOnlineMapper.selectByPrimaryKey(it.getId()); + if(ObjectUtil.isEmpty(online)){ + online=new TbShopOnline(); + + online.setShopId(it.getId()); + if(it.getBusinessTime()!=null&&ObjectUtil.isNotEmpty(it.getBusinessTime())&&it.getBusinessTime().contains("-")){ + String[] times=it.getBusinessTime().split("-"); + String startTimestr=times[0]; + String entTimestr=times[1]; + + Date startTime= DateUtils.fomatDateTime(DateUtils.getDay().concat(" ").concat(startTimestr).concat(":00")); + Date entTime= DateUtils.fomatDateTime(DateUtils.getDay().concat(" ").concat(entTimestr).concat(":00")); + + if(entTime.getTime() tbShopInfos=tbShopInfoMapper.selectAllByCreateTime(); + if(ObjectUtil.isNotEmpty(tbShopInfos)&&tbShopInfos.size()>0){ + tbShopInfos.parallelStream().forEach(it->{ + TbShopOnline online= tbShopOnlineMapper.selectByPrimaryKey(it.getId()); + if(ObjectUtil.isEmpty(online)){ + online=new TbShopOnline(); + + online.setShopId(it.getId()); + if(it.getBusinessTime()!=null&&ObjectUtil.isNotEmpty(it.getBusinessTime())&&it.getBusinessTime().contains("-")){ + String[] times=it.getBusinessTime().split("-"); + String startTimestr=times[0]; + String entTimestr=times[1]; + + Date startTime= DateUtils.fomatDateTime(DateUtils.getDay().concat(" ").concat(startTimestr).concat(":00")); + Date entTime= DateUtils.fomatDateTime(DateUtils.getDay().concat(" ").concat(entTimestr).concat(":00")); + + if(entTime.getTime() map + ){ + return memberService.createMember(map); + } + + + @RequestMapping("memberScanPay") + public Result memberScanPay( + @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestBody Map map + + ){ + return memberService.memberScanPay(map); + } + + + + @GetMapping("queryScanPay") + public Result queryScanPay(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("flowId") String flowId + ){ + return memberService.queryScanPay(flowId); + } + + + + @RequestMapping("accountPay") + public Result accountPay( @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestBody Map map + ){ + return memberService.memberAccountPay(map); + } + + + @GetMapping("queryMemberAccount") + public Result queryMemberAccount(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("memberId") String memberId, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + + ){ + return memberService.queryMemberAccount(memberId,page,pageSize); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java new file mode 100644 index 0000000..7cfcf74 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.controller; + + +import com.alibaba.fastjson.JSON; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +@CrossOrigin(origins = "*") +@RestController +@Slf4j +@RequestMapping("notify") +public class NotifyController { + + + + @RequestMapping("notifyPay") + public String notifyPay(@RequestBody Map map){ + log.info("notifyPay:{}", JSON.toJSONString(map)); + return null; + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java new file mode 100644 index 0000000..216dbcd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java @@ -0,0 +1,117 @@ +package com.chaozhanggui.system.cashierservice.controller; + +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.entity.OrderVo; +import com.chaozhanggui.system.cashierservice.entity.vo.CartVo; +import com.chaozhanggui.system.cashierservice.service.OrderService; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.TokenUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@CrossOrigin(origins = "*") +@RestController +@Slf4j +@RequestMapping("order") +public class OrderController { + + + @Autowired + private OrderService orderService; + + @PostMapping("/createCart") + public Result createCart(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestBody CartVo cartVo + ){ + JSONObject jsonObject = TokenUtil.parseParamFromToken(token); + String userId = jsonObject.getString("accountId"); + return orderService.createCart(cartVo.getMasterId(),cartVo.getProductId(),cartVo.getShopId(), + cartVo.getSkuId(),cartVo.getNumber(),userId,clientType,cartVo.getCartId(),cartVo.getIsGift(), + cartVo.getIsPack(),cartVo.getUuid(),cartVo.getType()); + } + @GetMapping("/queryCart") + public Result queryCart(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("masterId") String masterId, + @RequestParam("shopId") String shopId + ){ + return orderService.queryCart(masterId,shopId); + } + @GetMapping("/delCart") + public Result delCart(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("masterId") String masterId, + @RequestParam("cartId") Integer cartId + ){ + return orderService.delCart(masterId,cartId); + } + @GetMapping("/createCode") + public Result createCode(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId, + String type + ){ + JSONObject jsonObject = TokenUtil.parseParamFromToken(token); + String userId = jsonObject.getString("accountId"); + return orderService.createCode(shopId,clientType,userId,type); + } + @GetMapping("/getCartList") + public Result getCart(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId){ + return orderService.getCartList(shopId); + } + @GetMapping("/getCartPrductSpec") + public Result getCartPrductSpec(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestParam("cartId") Integer cartId){ + return orderService.getCartPrductSpec(cartId); + } + @PostMapping("/cartStatus") + public Result cartStatus(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){ + JSONObject jsonObject = TokenUtil.parseParamFromToken(token); + String userId = jsonObject.getString("accountId"); + String code = jsonObject.getString("code"); + return orderService.cartStatus(Integer.valueOf(cartVo.getShopId()),cartVo.getMasterId(),cartVo.getStatus(),userId,cartVo.getUuid(),clientType); + } + @PostMapping("/createOrder") + public Result createOrder(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestBody OrderVo orderVo){ + JSONObject jsonObject = TokenUtil.parseParamFromToken(token); + String userId = jsonObject.getString("accountId"); + orderVo.setMerchantId(Integer.valueOf(userId)); + orderVo.setUserId(jsonObject.getString("staffId")); + return orderService.createOrder(orderVo,clientType,token); + } + @PostMapping("/packall") + public Result packall(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){ + JSONObject jsonObject = TokenUtil.parseParamFromToken(token); + String userId = jsonObject.getString("accountId"); + return orderService.packall(cartVo); + } + @PostMapping("/clearCart") + public Result clearCart(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){ + return orderService.clearCart(cartVo); + } + + @GetMapping("/findOrder") + public Result findOrder(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId, + @RequestParam("status") String status,@RequestParam("orderNo") String orderNo,@RequestParam(value = "page", required = false, defaultValue = "1") Integer page, + @RequestParam(value = "size", required = false, defaultValue = "1") Integer size){ + return orderService.findOrder(shopId,status,page,size,orderNo); + } + @GetMapping("/orderDetail") + public Result orderDetail(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId, + @RequestParam("id") Integer id){ + return orderService.orderDetail(shopId,id); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java new file mode 100644 index 0000000..ca10c88 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java @@ -0,0 +1,134 @@ +package com.chaozhanggui.system.cashierservice.controller; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail; +import com.chaozhanggui.system.cashierservice.service.PayService; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.IpUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@CrossOrigin(origins = "*") +@RestController +@Slf4j +@RequestMapping("pay") +public class PayController { + + + @Autowired + PayService payService; + + + + @RequestMapping("queryPayType") + public Result queryPayType( @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId + + ){ + return payService.queryPayType(shopId); + } + + + /** + * 扫码支付 + * @param request + * @param token + * @param loginName + * @param clientType + * @param orderId + * @param authCode + * @return + */ + @RequestMapping("scanpay") + public Result scanpay(HttpServletRequest request, + @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("orderId") String orderId, + @RequestParam("authCode") String authCode + + ) { + return payService.scanPay(orderId,authCode, IpUtil.getIpAddr(request),token); + } + + + /** + * 储值卡支付 + * @param token + * @param loginName + * @param clientType + * @param orderId + * @param memberId + * @return + */ + @GetMapping("accountPay") + public Result accountPay(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("orderId") String orderId, + @RequestParam("memberId") String memberId + ){ + return payService.accountPay(orderId,memberId,token); + } + + /** + * 现金支付 + * @param token + * @param loginName + * @param clientType + * @param orderId + * @return + */ + @GetMapping("cashPay") + public Result cashPay(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("orderId") String orderId){ + return payService.cashPay(orderId,token); + } + + + + + /** + * 银行卡支付 + * @param token + * @param loginName + * @param clientType + * @param orderId + * @return + */ + @GetMapping("bankPay") + public Result bankPay(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("orderId") String orderId){ + return payService.bankPay(orderId,token); + } + + + + @RequestMapping("returnOrder") + public Result returnOrder(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestBody List list + ){ + return payService.returnOrder(list,token); + } + + + @GetMapping("queryOrder") + public Result queryOrder(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("orderId") String orderId){ + return payService.queryOrder(orderId,token); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java new file mode 100644 index 0000000..21f80f3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java @@ -0,0 +1,69 @@ +package com.chaozhanggui.system.cashierservice.controller; + + +import com.chaozhanggui.system.cashierservice.service.ProductService; +import com.chaozhanggui.system.cashierservice.sign.Result; +import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +@CrossOrigin(origins = "*") +@RestController +@Slf4j +@RequestMapping("product") +public class ProductController { + + + @Autowired + private ProductService productService; + + + @GetMapping(value = "queryCommodityInfo") + public Result queryCommodityInfo( + @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId, + @RequestParam("categoryId") String categoryId, + @RequestParam("commdityName") String commdityName, + @RequestParam("masterId") String masterId, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + ){ + + return productService.queryCommodityInfo(shopId,categoryId,commdityName,page,pageSize,masterId); + } + + + + + + + + @GetMapping(value = "queryCategory") + public Result queryCategory( @RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + ){ + + return productService.queryCategory(shopId,page,pageSize); + } + + + @GetMapping("queryProductSku") + public Result queryProductSku(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId, + @RequestParam("productId") String productId, + @RequestParam("spec_tag") String spec_tag + ){ + return productService.queryProductSku(shopId,productId,spec_tag); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ShopInfoController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ShopInfoController.java new file mode 100644 index 0000000..e8d688e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ShopInfoController.java @@ -0,0 +1,62 @@ +package com.chaozhanggui.system.cashierservice.controller; + + +import com.chaozhanggui.system.cashierservice.service.ShopInfoService; +import com.chaozhanggui.system.cashierservice.sign.Result; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@CrossOrigin(origins = "*") +@RestController +@Slf4j +@RequestMapping("shopInfo") +public class ShopInfoController { + + + @Autowired + ShopInfoService shopInfoService; + + @GetMapping("queryShopArea") + public Result queryShopArea(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId + ) { + + return shopInfoService.queryShopArea(shopId); + } + + + @GetMapping("queryShopTable") + public Result queryShopTable(@RequestHeader("token") String token, + @RequestHeader("loginName") String loginName, + @RequestHeader("clientType") String clientType, + @RequestParam("shopId") String shopId, + @RequestParam("areaId") String areaId, + @RequestParam("status") String status, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + + ) { + return shopInfoService.queryShopTable(shopId, areaId, status, page, pageSize); + } + + @GetMapping("queryDuty") + public Result queryDuty(@RequestHeader("token") String token, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + + ) { + return shopInfoService.queryDuty(token, page, pageSize); + } + @GetMapping("queryDutyFlow") + public Result queryDutyFlow(@RequestHeader("token") String token, + @RequestParam("shopId") String shopId, + @RequestParam("page") int page, + @RequestParam("pageSize") int pageSize + + ) { + return shopInfoService.queryDutyFlow(token, shopId, page,pageSize); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeColumnConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeColumnConfigMapper.java new file mode 100644 index 0000000..51d02ad --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeColumnConfigMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig; + +public interface CodeColumnConfigMapper { + int deleteByPrimaryKey(Long columnId); + + int insert(CodeColumnConfig record); + + int insertSelective(CodeColumnConfig record); + + CodeColumnConfig selectByPrimaryKey(Long columnId); + + int updateByPrimaryKeySelective(CodeColumnConfig record); + + int updateByPrimaryKey(CodeColumnConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeGenConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeGenConfigMapper.java new file mode 100644 index 0000000..2474703 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/CodeGenConfigMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.CodeGenConfig; + +public interface CodeGenConfigMapper { + int deleteByPrimaryKey(Long configId); + + int insert(CodeGenConfig record); + + int insertSelective(CodeGenConfig record); + + CodeGenConfig selectByPrimaryKey(Long configId); + + int updateByPrimaryKeySelective(CodeGenConfig record); + + int updateByPrimaryKey(CodeGenConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/GUserSetMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/GUserSetMapper.java new file mode 100644 index 0000000..a2ab6a0 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/GUserSetMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.GUserSet; + +public interface GUserSetMapper { + int deleteByPrimaryKey(Integer id); + + int insert(GUserSet record); + + int insertSelective(GUserSet record); + + GUserSet selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(GUserSet record); + + int updateByPrimaryKey(GUserSet record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntAppMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntAppMapper.java new file mode 100644 index 0000000..9d90e61 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntAppMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntApp; + +public interface MntAppMapper { + int deleteByPrimaryKey(Long appId); + + int insert(MntApp record); + + int insertSelective(MntApp record); + + MntApp selectByPrimaryKey(Long appId); + + int updateByPrimaryKeySelective(MntApp record); + + int updateByPrimaryKey(MntApp record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDatabaseMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDatabaseMapper.java new file mode 100644 index 0000000..c927c24 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDatabaseMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntDatabase; + +public interface MntDatabaseMapper { + int deleteByPrimaryKey(String dbId); + + int insert(MntDatabase record); + + int insertSelective(MntDatabase record); + + MntDatabase selectByPrimaryKey(String dbId); + + int updateByPrimaryKeySelective(MntDatabase record); + + int updateByPrimaryKey(MntDatabase record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployHistoryMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployHistoryMapper.java new file mode 100644 index 0000000..da8402f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployHistoryMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntDeployHistory; + +public interface MntDeployHistoryMapper { + int deleteByPrimaryKey(String historyId); + + int insert(MntDeployHistory record); + + int insertSelective(MntDeployHistory record); + + MntDeployHistory selectByPrimaryKey(String historyId); + + int updateByPrimaryKeySelective(MntDeployHistory record); + + int updateByPrimaryKey(MntDeployHistory record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployMapper.java new file mode 100644 index 0000000..8bb916c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntDeploy; + +public interface MntDeployMapper { + int deleteByPrimaryKey(Long deployId); + + int insert(MntDeploy record); + + int insertSelective(MntDeploy record); + + MntDeploy selectByPrimaryKey(Long deployId); + + int updateByPrimaryKeySelective(MntDeploy record); + + int updateByPrimaryKey(MntDeploy record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployServerMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployServerMapper.java new file mode 100644 index 0000000..f55230a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntDeployServerMapper.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey; + +public interface MntDeployServerMapper { + int deleteByPrimaryKey(MntDeployServerKey key); + + int insert(MntDeployServerKey record); + + int insertSelective(MntDeployServerKey record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntServerMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntServerMapper.java new file mode 100644 index 0000000..71f8043 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/MntServerMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.MntServer; + +public interface MntServerMapper { + int deleteByPrimaryKey(Long serverId); + + int insert(MntServer record); + + int insertSelective(MntServer record); + + MntServer selectByPrimaryKey(Long serverId); + + int updateByPrimaryKeySelective(MntServer record); + + int updateByPrimaryKey(MntServer record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java new file mode 100644 index 0000000..3e1f51f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyDetailMapper.java @@ -0,0 +1,29 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Mapper +@Component +public interface ShopUserDutyDetailMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ShopUserDutyDetail record); + + int insertSelective(ShopUserDutyDetail record); + + ShopUserDutyDetail selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ShopUserDutyDetail record); + + int updateByPrimaryKey(ShopUserDutyDetail record); + int batchInsert(@Param("list") List list); + + List selectByDuctId(@Param("id") Integer id, @Param("list") List list); + + List selectAllByDuctId(@Param("id") Integer id); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java new file mode 100644 index 0000000..7146a3e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java @@ -0,0 +1,35 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ShopUserDuty; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.List; + +@Component +@Mapper +public interface ShopUserDutyMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ShopUserDuty record); + + int insertSelective(ShopUserDuty record); + + ShopUserDuty selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ShopUserDuty record); + + int updateByPrimaryKey(ShopUserDuty record); + + ShopUserDuty selectByTokenId(@Param("tokenId") Integer tokenId); + + void updateStatusByTokenId(@Param("tokenId") Integer tokenId); + + List selectByShopId(@Param("shopId") String shopId); + + BigDecimal selectSumAmount(@Param("shopId") String shopId); + + ShopUserDuty selectByTokenIdAndTradeDay(@Param("tokenId") int tokenId, @Param("day") String day,@Param("shopId") String shopId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java new file mode 100644 index 0000000..38f8ffc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyPayMapper.java @@ -0,0 +1,24 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface ShopUserDutyPayMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ShopUserDutyPay record); + + int insertSelective(ShopUserDutyPay record); + + ShopUserDutyPay selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ShopUserDutyPay record); + + int updateByPrimaryKey(ShopUserDutyPay record); + + ShopUserDutyPay selectByDuctIdAndType(@Param("dutyId") Integer dutyId,@Param("payType") String payType); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDeptMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDeptMapper.java new file mode 100644 index 0000000..b71b326 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDeptMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysDept; + +public interface SysDeptMapper { + int deleteByPrimaryKey(Long deptId); + + int insert(SysDept record); + + int insertSelective(SysDept record); + + SysDept selectByPrimaryKey(Long deptId); + + int updateByPrimaryKeySelective(SysDept record); + + int updateByPrimaryKey(SysDept record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictDetailMapper.java new file mode 100644 index 0000000..db7547e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictDetailMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysDictDetail; + +public interface SysDictDetailMapper { + int deleteByPrimaryKey(Long detailId); + + int insert(SysDictDetail record); + + int insertSelective(SysDictDetail record); + + SysDictDetail selectByPrimaryKey(Long detailId); + + int updateByPrimaryKeySelective(SysDictDetail record); + + int updateByPrimaryKey(SysDictDetail record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictMapper.java new file mode 100644 index 0000000..7204534 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysDictMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysDict; + +public interface SysDictMapper { + int deleteByPrimaryKey(Long dictId); + + int insert(SysDict record); + + int insertSelective(SysDict record); + + SysDict selectByPrimaryKey(Long dictId); + + int updateByPrimaryKeySelective(SysDict record); + + int updateByPrimaryKey(SysDict record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysJobMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysJobMapper.java new file mode 100644 index 0000000..2be374c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysJobMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysJob; + +public interface SysJobMapper { + int deleteByPrimaryKey(Long jobId); + + int insert(SysJob record); + + int insertSelective(SysJob record); + + SysJob selectByPrimaryKey(Long jobId); + + int updateByPrimaryKeySelective(SysJob record); + + int updateByPrimaryKey(SysJob record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysLogMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysLogMapper.java new file mode 100644 index 0000000..575629b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysLogMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysLog; +import com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs; + +public interface SysLogMapper { + int deleteByPrimaryKey(Long logId); + + int insert(SysLogWithBLOBs record); + + int insertSelective(SysLogWithBLOBs record); + + SysLogWithBLOBs selectByPrimaryKey(Long logId); + + int updateByPrimaryKeySelective(SysLogWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(SysLogWithBLOBs record); + + int updateByPrimaryKey(SysLog record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysMenuMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysMenuMapper.java new file mode 100644 index 0000000..8220af9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysMenuMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysMenu; + +public interface SysMenuMapper { + int deleteByPrimaryKey(Long menuId); + + int insert(SysMenu record); + + int insertSelective(SysMenu record); + + SysMenu selectByPrimaryKey(Long menuId); + + int updateByPrimaryKeySelective(SysMenu record); + + int updateByPrimaryKey(SysMenu record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzJobMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzJobMapper.java new file mode 100644 index 0000000..db12f33 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzJobMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysQuartzJob; + +public interface SysQuartzJobMapper { + int deleteByPrimaryKey(Long jobId); + + int insert(SysQuartzJob record); + + int insertSelective(SysQuartzJob record); + + SysQuartzJob selectByPrimaryKey(Long jobId); + + int updateByPrimaryKeySelective(SysQuartzJob record); + + int updateByPrimaryKey(SysQuartzJob record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzLogMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzLogMapper.java new file mode 100644 index 0000000..01fe704 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysQuartzLogMapper.java @@ -0,0 +1,19 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysQuartzLog; + +public interface SysQuartzLogMapper { + int deleteByPrimaryKey(Long logId); + + int insert(SysQuartzLog record); + + int insertSelective(SysQuartzLog record); + + SysQuartzLog selectByPrimaryKey(Long logId); + + int updateByPrimaryKeySelective(SysQuartzLog record); + + int updateByPrimaryKeyWithBLOBs(SysQuartzLog record); + + int updateByPrimaryKey(SysQuartzLog record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRoleMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRoleMapper.java new file mode 100644 index 0000000..05e5c34 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRoleMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysRole; + +public interface SysRoleMapper { + int deleteByPrimaryKey(Long roleId); + + int insert(SysRole record); + + int insertSelective(SysRole record); + + SysRole selectByPrimaryKey(Long roleId); + + int updateByPrimaryKeySelective(SysRole record); + + int updateByPrimaryKey(SysRole record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesDeptsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesDeptsMapper.java new file mode 100644 index 0000000..d76f3c2 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesDeptsMapper.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysRolesDeptsKey; + +public interface SysRolesDeptsMapper { + int deleteByPrimaryKey(SysRolesDeptsKey key); + + int insert(SysRolesDeptsKey record); + + int insertSelective(SysRolesDeptsKey record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesMenusMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesMenusMapper.java new file mode 100644 index 0000000..d4afdf6 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysRolesMenusMapper.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey; + +public interface SysRolesMenusMapper { + int deleteByPrimaryKey(SysRolesMenusKey key); + + int insert(SysRolesMenusKey record); + + int insertSelective(SysRolesMenusKey record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUserMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUserMapper.java new file mode 100644 index 0000000..0def8a3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUserMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysUser; + +public interface SysUserMapper { + int deleteByPrimaryKey(Long userId); + + int insert(SysUser record); + + int insertSelective(SysUser record); + + SysUser selectByPrimaryKey(Long userId); + + int updateByPrimaryKeySelective(SysUser record); + + int updateByPrimaryKey(SysUser record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersJobsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersJobsMapper.java new file mode 100644 index 0000000..7ff4a5a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersJobsMapper.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey; + +public interface SysUsersJobsMapper { + int deleteByPrimaryKey(SysUsersJobsKey key); + + int insert(SysUsersJobsKey record); + + int insertSelective(SysUsersJobsKey record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersRolesMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersRolesMapper.java new file mode 100644 index 0000000..d9f4ab5 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/SysUsersRolesMapper.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.SysUsersRolesKey; + +public interface SysUsersRolesMapper { + int deleteByPrimaryKey(SysUsersRolesKey key); + + int insert(SysUsersRolesKey record); + + int insertSelective(SysUsersRolesKey record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java new file mode 100644 index 0000000..9815a23 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java @@ -0,0 +1,62 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbCashierCart; +import com.chaozhanggui.system.cashierservice.entity.po.CartPo; +import com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbCashierCartMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbCashierCart record); + + int insertSelective(TbCashierCart record); + + TbCashierCart selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbCashierCart record); + + int updateByPrimaryKey(TbCashierCart record); + + + List selectALlByMasterId(@Param("masterId") String masterId,@Param("status") String status); + + TbCashierCart selectByDetail(@Param("masterId") String masterId, @Param("productId") String productId, + @Param("shopId") String shopId, @Param("skuId") String skuId, @Param("day") String day,@Param("uuid") String uuid); + + List selectByMaskerId(@Param("masterId")String masterId, @Param("shopId")Integer shopId,@Param("status") String status); + + void deleteByCartId(@Param("masterId") String masterId, @Param("cartId")Integer cartId); + + void updateStatus(@Param("masterId") Integer id,@Param("status") String status); + + List selectCartList( @Param("shopId") Integer shopId); + + void updateStatusByMaster(@Param("shopId") Integer shopId, @Param("masterId") String masterId, + @Param("status") String status, @Param("day") String day, @Param("uuid") String uuid); + + List selectAllCreateOrder(@Param("masterId") String masterId, @Param("shopId") Integer shopId, + @Param("day") String day, @Param("status") String status,@Param("uuid") String uuid); + List selectCartList( @Param("cartId") String shopId); + + int updateByOrderId(@Param("orderId") String orderId,@Param("status") String status); + + QueryCartPo selectProductNumByMarketId(@Param("day") String day, @Param("shopId") String shopId, @Param("masterId") String masterId); + + void updateIsGift(@Param("maskerId")String maskerId,@Param("status")String status,@Param("shopId") Integer shopId,@Param("day") String day); + + int selectqgList(@Param("shopId") String shopId); + + void deleteBymasterId(@Param("masterId") String masterId, @Param("shopId") Integer shopId, + @Param("day") String day,@Param("status") String status,@Param("uuid") String uuid); + + + + List selectByOrderId(@Param("orderId") String orderId,@Param("status") String status); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java new file mode 100644 index 0000000..38b0c4d --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo; + +public interface TbDeviceOperateInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbDeviceOperateInfo record); + + int insertSelective(TbDeviceOperateInfo record); + + TbDeviceOperateInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbDeviceOperateInfo record); + + int updateByPrimaryKey(TbDeviceOperateInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java new file mode 100644 index 0000000..88b0e55 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbDeviceStock; + +public interface TbDeviceStockMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbDeviceStock record); + + int insertSelective(TbDeviceStock record); + + TbDeviceStock selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbDeviceStock record); + + int updateByPrimaryKey(TbDeviceStock record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMemberInMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMemberInMapper.java new file mode 100644 index 0000000..91a7c39 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMemberInMapper.java @@ -0,0 +1,21 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbMemberIn; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbMemberInMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbMemberIn record); + + int insertSelective(TbMemberIn record); + + TbMemberIn selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbMemberIn record); + + int updateByPrimaryKey(TbMemberIn record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantRegisterMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantRegisterMapper.java new file mode 100644 index 0000000..6b3a888 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantRegisterMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister; + +public interface TbMerchantRegisterMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbMerchantRegister record); + + int insertSelective(TbMerchantRegister record); + + TbMerchantRegister selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbMerchantRegister record); + + int updateByPrimaryKey(TbMerchantRegister record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantThirdApplyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantThirdApplyMapper.java new file mode 100644 index 0000000..53707ad --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantThirdApplyMapper.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbMerchantThirdApplyMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbMerchantThirdApply record); + + int insertSelective(TbMerchantThirdApply record); + + TbMerchantThirdApply selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbMerchantThirdApply record); + + int updateByPrimaryKeyWithBLOBs(TbMerchantThirdApply record); + + int updateByPrimaryKey(TbMerchantThirdApply record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderDetailMapper.java new file mode 100644 index 0000000..7499f13 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderDetailMapper.java @@ -0,0 +1,44 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail; +import com.chaozhanggui.system.cashierservice.entity.po.OrderDetailPo; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.List; + +@Mapper +@Component +public interface TbOrderDetailMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbOrderDetail record); + + int insertSelective(TbOrderDetail record); + + TbOrderDetail selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbOrderDetail record); + + int updateByPrimaryKey(TbOrderDetail record); + + void updateStatusByOrderId(@Param("orderId") int orderId,@Param("status") String status); + + void updateStatusByOrderIdAndStatus(@Param("orderId") int orderId,@Param("status") String status); + void deleteByOUrderId(@Param("orderId") int orderId); + + List selectAllByOrderId(@Param("id") Integer id); + + int updateBatchOrderDetail(@Param("list")List list); + + + + List selectAllByOrderIdAndStatus(@Param("list") List list, @Param("orderId") String orderId); + + BigDecimal selectByOrderId(String orderId); + + int batchInsert(@Param("list") List list,@Param("orderId") String orderId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderExtendMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderExtendMapper.java new file mode 100644 index 0000000..018c1da --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderExtendMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderExtend; +import com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs; + +public interface TbOrderExtendMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbOrderExtendWithBLOBs record); + + int insertSelective(TbOrderExtendWithBLOBs record); + + TbOrderExtendWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbOrderExtendWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbOrderExtendWithBLOBs record); + + int updateByPrimaryKey(TbOrderExtend record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java new file mode 100644 index 0000000..3eaac2a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java @@ -0,0 +1,33 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo; +import com.chaozhanggui.system.cashierservice.entity.po.OrderPo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbOrderInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbOrderInfo record); + + int insertSelective(TbOrderInfo record); + + TbOrderInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbOrderInfo record); + + int updateByPrimaryKey(TbOrderInfo record); + + void updateStatusById(@Param("orderId") int orderId,@Param("status") String status); + + + List selectAllByStatus(String status); + + List selectAllByShop(@Param("shopId") Integer shopId, @Param("orderType") String orderType, + @Param("day") String day, @Param("orderNo") String orderNo); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderPaymentMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderPaymentMapper.java new file mode 100644 index 0000000..5d13fdc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderPaymentMapper.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderPayment; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbOrderPaymentMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbOrderPayment record); + + int insertSelective(TbOrderPayment record); + + TbOrderPayment selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbOrderPayment record); + + int updateByPrimaryKey(TbOrderPayment record); + + TbOrderPayment selectByOrderId(String orderId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java new file mode 100644 index 0000000..c97cc2d --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java @@ -0,0 +1,19 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods; + +public interface TbPlussDeviceGoodsMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbPlussDeviceGoods record); + + int insertSelective(TbPlussDeviceGoods record); + + TbPlussDeviceGoods selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbPlussDeviceGoods record); + + int updateByPrimaryKeyWithBLOBs(TbPlussDeviceGoods record); + + int updateByPrimaryKey(TbPlussDeviceGoods record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussShopStaffMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussShopStaffMapper.java new file mode 100644 index 0000000..dec7561 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussShopStaffMapper.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbPlussShopStaffMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbPlussShopStaff record); + + int insertSelective(TbPlussShopStaff record); + + TbPlussShopStaff selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbPlussShopStaff record); + + int updateByPrimaryKey(TbPlussShopStaff record); + + TbPlussShopStaff selectByAccount(String account); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPrintMachineMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPrintMachineMapper.java new file mode 100644 index 0000000..98984f8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPrintMachineMapper.java @@ -0,0 +1,28 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbPrintMachine; +import com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbPrintMachineMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbPrintMachineWithBLOBs record); + + int insertSelective(TbPrintMachineWithBLOBs record); + + TbPrintMachineWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbPrintMachineWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbPrintMachineWithBLOBs record); + + int updateByPrimaryKey(TbPrintMachine record); + + List selectByShopId(String shopId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductGroupMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductGroupMapper.java new file mode 100644 index 0000000..5131bab --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductGroupMapper.java @@ -0,0 +1,19 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductGroup; + +public interface TbProductGroupMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductGroup record); + + int insertSelective(TbProductGroup record); + + TbProductGroup selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductGroup record); + + int updateByPrimaryKeyWithBLOBs(TbProductGroup record); + + int updateByPrimaryKey(TbProductGroup record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java new file mode 100644 index 0000000..fcc2685 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java @@ -0,0 +1,39 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProduct; +import com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbProductMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductWithBLOBs record); + + int insertSelective(TbProductWithBLOBs record); + + TbProductWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbProductWithBLOBs record); + + int updateByPrimaryKey(TbProduct record); + + + List selectByShopId(@Param("shopId") String shopId,@Param("commdityName") String commdityName); + + + + List selectByShopIdAndShopType(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName); + + + + Integer countOrderByshopIdAndProductId(@Param("shopId") String shopId, @Param("productId") String productId, @Param("masterId") String masterId); + +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuMapper.java new file mode 100644 index 0000000..e78164f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuMapper.java @@ -0,0 +1,30 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductSku; +import com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbProductSkuMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductSkuWithBLOBs record); + + int insertSelective(TbProductSkuWithBLOBs record); + + TbProductSkuWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductSkuWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbProductSkuWithBLOBs record); + + int updateByPrimaryKey(TbProductSku record); + + + TbProductSkuWithBLOBs selectByShopIdAndProductIdAndSpec(@Param("shopId") String shopId, @Param("productId") String productId, @Param("spec") String spec); + + TbProductSkuWithBLOBs selectByProduct(@Param("productId") Integer productId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuResultMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuResultMapper.java new file mode 100644 index 0000000..2f91148 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSkuResultMapper.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbProductSkuResultMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductSkuResult record); + + int insertSelective(TbProductSkuResult record); + + TbProductSkuResult selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductSkuResult record); + + int updateByPrimaryKeyWithBLOBs(TbProductSkuResult record); + + int updateByPrimaryKey(TbProductSkuResult record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSpecMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSpecMapper.java new file mode 100644 index 0000000..c63a7e9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductSpecMapper.java @@ -0,0 +1,25 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductSpec; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbProductSpecMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductSpec record); + + int insertSelective(TbProductSpec record); + + TbProductSpec selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductSpec record); + + int updateByPrimaryKeyWithBLOBs(TbProductSpec record); + + int updateByPrimaryKey(TbProductSpec record); + +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockDetailMapper.java new file mode 100644 index 0000000..e7f0bb9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockDetailMapper.java @@ -0,0 +1,19 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail; + +public interface TbProductStockDetailMapper { + int deleteByPrimaryKey(Long id); + + int insert(TbProductStockDetail record); + + int insertSelective(TbProductStockDetail record); + + TbProductStockDetail selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbProductStockDetail record); + + int updateByPrimaryKeyWithBLOBs(TbProductStockDetail record); + + int updateByPrimaryKey(TbProductStockDetail record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockOperateMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockOperateMapper.java new file mode 100644 index 0000000..0f057e1 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductStockOperateMapper.java @@ -0,0 +1,19 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate; + +public interface TbProductStockOperateMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbProductStockOperate record); + + int insertSelective(TbProductStockOperate record); + + TbProductStockOperate selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbProductStockOperate record); + + int updateByPrimaryKeyWithBLOBs(TbProductStockOperate record); + + int updateByPrimaryKey(TbProductStockOperate record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java new file mode 100644 index 0000000..51af334 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbReceiptSales; + +public interface TbReceiptSalesMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbReceiptSales record); + + int insertSelective(TbReceiptSales record); + + TbReceiptSales selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbReceiptSales record); + + int updateByPrimaryKey(TbReceiptSales record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java new file mode 100644 index 0000000..0f317e8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog; + +public interface TbRenewalsPayLogMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbRenewalsPayLog record); + + int insertSelective(TbRenewalsPayLog record); + + TbRenewalsPayLog selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbRenewalsPayLog record); + + int updateByPrimaryKey(TbRenewalsPayLog record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAreaMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAreaMapper.java new file mode 100644 index 0000000..18ae5bc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAreaMapper.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopArea; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopAreaMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopArea record); + + int insertSelective(TbShopArea record); + + TbShopArea selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopArea record); + + int updateByPrimaryKeyWithBLOBs(TbShopArea record); + + int updateByPrimaryKey(TbShopArea record); + + List selectByShopId(String shopId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java new file mode 100644 index 0000000..ddcc1bd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread; +import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs; + +public interface TbShopCashSpreadMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopCashSpreadWithBLOBs record); + + int insertSelective(TbShopCashSpreadWithBLOBs record); + + TbShopCashSpreadWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopCashSpreadWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbShopCashSpreadWithBLOBs record); + + int updateByPrimaryKey(TbShopCashSpread record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCategoryMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCategoryMapper.java new file mode 100644 index 0000000..80ff571 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCategoryMapper.java @@ -0,0 +1,25 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopCategory; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopCategoryMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopCategory record); + + int insertSelective(TbShopCategory record); + + TbShopCategory selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopCategory record); + + int updateByPrimaryKey(TbShopCategory record); + + List selectByAll(String shopId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java new file mode 100644 index 0000000..8dbcb5b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopCurrency; +import com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs; + +public interface TbShopCurrencyMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopCurrencyWithBLOBs record); + + int insertSelective(TbShopCurrencyWithBLOBs record); + + TbShopCurrencyWithBLOBs selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopCurrencyWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TbShopCurrencyWithBLOBs record); + + int updateByPrimaryKey(TbShopCurrency record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java new file mode 100644 index 0000000..a267801 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java @@ -0,0 +1,29 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopInfo record); + + int insertSelective(TbShopInfo record); + + TbShopInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopInfo record); + + int updateByPrimaryKeyWithBLOBs(TbShopInfo record); + + int updateByPrimaryKey(TbShopInfo record); + + List selectAll(); + + List selectAllByCreateTime(); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOnlineMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOnlineMapper.java new file mode 100644 index 0000000..da44176 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOnlineMapper.java @@ -0,0 +1,21 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopOnline; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbShopOnlineMapper { + int deleteByPrimaryKey(Integer shopId); + + int insert(TbShopOnline record); + + int insertSelective(TbShopOnline record); + + TbShopOnline selectByPrimaryKey(Integer shopId); + + int updateByPrimaryKeySelective(TbShopOnline record); + + int updateByPrimaryKey(TbShopOnline record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPayTypeMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPayTypeMapper.java new file mode 100644 index 0000000..17393a4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPayTypeMapper.java @@ -0,0 +1,30 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopPayType; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopPayTypeMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopPayType record); + + int insertSelective(TbShopPayType record); + + TbShopPayType selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopPayType record); + + int updateByPrimaryKey(TbShopPayType record); + + List selectByShopId(String shopId); + + int countSelectByShopIdAndPayType(@Param("shopId") String shopId, @Param("payType") String payType ); + + +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorMapper.java new file mode 100644 index 0000000..edaa45b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor; + +public interface TbShopPurveyorMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopPurveyor record); + + int insertSelective(TbShopPurveyor record); + + TbShopPurveyor selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopPurveyor record); + + int updateByPrimaryKey(TbShopPurveyor record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorTransactMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorTransactMapper.java new file mode 100644 index 0000000..f5d20a0 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopPurveyorTransactMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact; + +public interface TbShopPurveyorTransactMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopPurveyorTransact record); + + int insertSelective(TbShopPurveyorTransact record); + + TbShopPurveyorTransact selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopPurveyorTransact record); + + int updateByPrimaryKey(TbShopPurveyorTransact record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopTableMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopTableMapper.java new file mode 100644 index 0000000..c686b5e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopTableMapper.java @@ -0,0 +1,26 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopTable; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopTableMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopTable record); + + int insertSelective(TbShopTable record); + + TbShopTable selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopTable record); + + int updateByPrimaryKey(TbShopTable record); + + List selectByShopIdAndStatus(@Param("shopId") String shopId,@Param("areaId") String areaId,@Param("status") String status); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUnitMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUnitMapper.java new file mode 100644 index 0000000..920048c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUnitMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopUnit; + +public interface TbShopUnitMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopUnit record); + + int insertSelective(TbShopUnit record); + + TbShopUnit selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopUnit record); + + int updateByPrimaryKey(TbShopUnit record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserFlowMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserFlowMapper.java new file mode 100644 index 0000000..7cf0c32 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserFlowMapper.java @@ -0,0 +1,26 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + +@Component +@Mapper +public interface TbShopUserFlowMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopUserFlow record); + + int insertSelective(TbShopUserFlow record); + + TbShopUserFlow selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopUserFlow record); + + int updateByPrimaryKey(TbShopUserFlow record); + + List> selectByMemberAccountFlow(String memberId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java new file mode 100644 index 0000000..664e7e4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java @@ -0,0 +1,26 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbShopUser; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbShopUserMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbShopUser record); + + int insertSelective(TbShopUser record); + + TbShopUser selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbShopUser record); + + int updateByPrimaryKey(TbShopUser record); + + List selectByShopId(@Param("shopId") String shopId,@Param("phone") String phone); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbTokenMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbTokenMapper.java new file mode 100644 index 0000000..b0bfa81 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbTokenMapper.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbToken; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbTokenMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbToken record); + + int insertSelective(TbToken record); + + TbToken selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbToken record); + + int updateByPrimaryKey(TbToken record); + + TbToken selectByToken(String token); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserInfoMapper.java new file mode 100644 index 0000000..df33cc8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserInfoMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbUserInfo; + +public interface TbUserInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbUserInfo record); + + int insertSelective(TbUserInfo record); + + TbUserInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbUserInfo record); + + int updateByPrimaryKey(TbUserInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbmerchantAccountMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbmerchantAccountMapper.java new file mode 100644 index 0000000..cd61749 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbmerchantAccountMapper.java @@ -0,0 +1,26 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Component +@Mapper +public interface TbmerchantAccountMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbmerchantAccount record); + + int insertSelective(TbmerchantAccount record); + + TbmerchantAccount selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbmerchantAccount record); + + int updateByPrimaryKeyWithBLOBs(TbmerchantAccount record); + + int updateByPrimaryKey(TbmerchantAccount record); + + + TbmerchantAccount selectByAccount(String account); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolAlipayConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolAlipayConfigMapper.java new file mode 100644 index 0000000..dd5f556 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolAlipayConfigMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfig; +import com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs; + +public interface ToolAlipayConfigMapper { + int deleteByPrimaryKey(Long configId); + + int insert(ToolAlipayConfigWithBLOBs record); + + int insertSelective(ToolAlipayConfigWithBLOBs record); + + ToolAlipayConfigWithBLOBs selectByPrimaryKey(Long configId); + + int updateByPrimaryKeySelective(ToolAlipayConfigWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(ToolAlipayConfigWithBLOBs record); + + int updateByPrimaryKey(ToolAlipayConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolEmailConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolEmailConfigMapper.java new file mode 100644 index 0000000..8b2d2f0 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolEmailConfigMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig; + +public interface ToolEmailConfigMapper { + int deleteByPrimaryKey(Long configId); + + int insert(ToolEmailConfig record); + + int insertSelective(ToolEmailConfig record); + + ToolEmailConfig selectByPrimaryKey(Long configId); + + int updateByPrimaryKeySelective(ToolEmailConfig record); + + int updateByPrimaryKey(ToolEmailConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolLocalStorageMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolLocalStorageMapper.java new file mode 100644 index 0000000..fcad4d7 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolLocalStorageMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ToolLocalStorage; + +public interface ToolLocalStorageMapper { + int deleteByPrimaryKey(Long storageId); + + int insert(ToolLocalStorage record); + + int insertSelective(ToolLocalStorage record); + + ToolLocalStorage selectByPrimaryKey(Long storageId); + + int updateByPrimaryKeySelective(ToolLocalStorage record); + + int updateByPrimaryKey(ToolLocalStorage record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuConfigMapper.java new file mode 100644 index 0000000..b077cae --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuConfigMapper.java @@ -0,0 +1,20 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfig; +import com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs; + +public interface ToolQiniuConfigMapper { + int deleteByPrimaryKey(Long configId); + + int insert(ToolQiniuConfigWithBLOBs record); + + int insertSelective(ToolQiniuConfigWithBLOBs record); + + ToolQiniuConfigWithBLOBs selectByPrimaryKey(Long configId); + + int updateByPrimaryKeySelective(ToolQiniuConfigWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(ToolQiniuConfigWithBLOBs record); + + int updateByPrimaryKey(ToolQiniuConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuContentMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuContentMapper.java new file mode 100644 index 0000000..bd580a5 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ToolQiniuContentMapper.java @@ -0,0 +1,17 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent; + +public interface ToolQiniuContentMapper { + int deleteByPrimaryKey(Long contentId); + + int insert(ToolQiniuContent record); + + int insertSelective(ToolQiniuContent record); + + ToolQiniuContent selectByPrimaryKey(Long contentId); + + int updateByPrimaryKeySelective(ToolQiniuContent record); + + int updateByPrimaryKey(ToolQiniuContent record); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeColumnConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeColumnConfig.java new file mode 100644 index 0000000..f1a0b5e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeColumnConfig.java @@ -0,0 +1,147 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class CodeColumnConfig implements Serializable { + private Long columnId; + + private String tableName; + + private String columnName; + + private String columnType; + + private String dictName; + + private String extra; + + private Boolean formShow; + + private String formType; + + private String keyType; + + private Boolean listShow; + + private Boolean notNull; + + private String queryType; + + private String remark; + + private String dateAnnotation; + + private static final long serialVersionUID = 1L; + + public Long getColumnId() { + return columnId; + } + + public void setColumnId(Long columnId) { + this.columnId = columnId; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName == null ? null : tableName.trim(); + } + + public String getColumnName() { + return columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName == null ? null : columnName.trim(); + } + + public String getColumnType() { + return columnType; + } + + public void setColumnType(String columnType) { + this.columnType = columnType == null ? null : columnType.trim(); + } + + public String getDictName() { + return dictName; + } + + public void setDictName(String dictName) { + this.dictName = dictName == null ? null : dictName.trim(); + } + + public String getExtra() { + return extra; + } + + public void setExtra(String extra) { + this.extra = extra == null ? null : extra.trim(); + } + + public Boolean getFormShow() { + return formShow; + } + + public void setFormShow(Boolean formShow) { + this.formShow = formShow; + } + + public String getFormType() { + return formType; + } + + public void setFormType(String formType) { + this.formType = formType == null ? null : formType.trim(); + } + + public String getKeyType() { + return keyType; + } + + public void setKeyType(String keyType) { + this.keyType = keyType == null ? null : keyType.trim(); + } + + public Boolean getListShow() { + return listShow; + } + + public void setListShow(Boolean listShow) { + this.listShow = listShow; + } + + public Boolean getNotNull() { + return notNull; + } + + public void setNotNull(Boolean notNull) { + this.notNull = notNull; + } + + public String getQueryType() { + return queryType; + } + + public void setQueryType(String queryType) { + this.queryType = queryType == null ? null : queryType.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getDateAnnotation() { + return dateAnnotation; + } + + public void setDateAnnotation(String dateAnnotation) { + this.dateAnnotation = dateAnnotation == null ? null : dateAnnotation.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeGenConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeGenConfig.java new file mode 100644 index 0000000..b9d1541 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/CodeGenConfig.java @@ -0,0 +1,107 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class CodeGenConfig implements Serializable { + private Long configId; + + private String tableName; + + private String author; + + private Boolean cover; + + private String moduleName; + + private String pack; + + private String path; + + private String apiPath; + + private String prefix; + + private String apiAlias; + + private static final long serialVersionUID = 1L; + + public Long getConfigId() { + return configId; + } + + public void setConfigId(Long configId) { + this.configId = configId; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName == null ? null : tableName.trim(); + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author == null ? null : author.trim(); + } + + public Boolean getCover() { + return cover; + } + + public void setCover(Boolean cover) { + this.cover = cover; + } + + public String getModuleName() { + return moduleName; + } + + public void setModuleName(String moduleName) { + this.moduleName = moduleName == null ? null : moduleName.trim(); + } + + public String getPack() { + return pack; + } + + public void setPack(String pack) { + this.pack = pack == null ? null : pack.trim(); + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path == null ? null : path.trim(); + } + + public String getApiPath() { + return apiPath; + } + + public void setApiPath(String apiPath) { + this.apiPath = apiPath == null ? null : apiPath.trim(); + } + + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix == null ? null : prefix.trim(); + } + + public String getApiAlias() { + return apiAlias; + } + + public void setApiAlias(String apiAlias) { + this.apiAlias = apiAlias == null ? null : apiAlias.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/GUserSet.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/GUserSet.java new file mode 100644 index 0000000..c7fb0ae --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/GUserSet.java @@ -0,0 +1,128 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class GUserSet implements Serializable { + private Integer id; + + private String appId; + + private String storeId; + + private String storeName; + + private String merchantName; + + private String token; + + private String ip; + + private String nofiyUrl; + + private String publicKey; + + private String privateKey; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId == null ? null : appId.trim(); + } + + public String getStoreId() { + return storeId; + } + + public void setStoreId(String storeId) { + this.storeId = storeId == null ? null : storeId.trim(); + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName == null ? null : storeName.trim(); + } + + public String getMerchantName() { + return merchantName; + } + + public void setMerchantName(String merchantName) { + this.merchantName = merchantName == null ? null : merchantName.trim(); + } + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token == null ? null : token.trim(); + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip == null ? null : ip.trim(); + } + + public String getNofiyUrl() { + return nofiyUrl; + } + + public void setNofiyUrl(String nofiyUrl) { + this.nofiyUrl = nofiyUrl == null ? null : nofiyUrl.trim(); + } + + public String getPublicKey() { + return publicKey; + } + + public void setPublicKey(String publicKey) { + this.publicKey = publicKey == null ? null : publicKey.trim(); + } + + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + this.privateKey = privateKey == null ? null : privateKey.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntApp.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntApp.java new file mode 100644 index 0000000..e6aff27 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntApp.java @@ -0,0 +1,128 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class MntApp implements Serializable { + private Long appId; + + private String name; + + private String uploadPath; + + private String deployPath; + + private String backupPath; + + private Integer port; + + private String startScript; + + private String deployScript; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getAppId() { + return appId; + } + + public void setAppId(Long appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getUploadPath() { + return uploadPath; + } + + public void setUploadPath(String uploadPath) { + this.uploadPath = uploadPath == null ? null : uploadPath.trim(); + } + + public String getDeployPath() { + return deployPath; + } + + public void setDeployPath(String deployPath) { + this.deployPath = deployPath == null ? null : deployPath.trim(); + } + + public String getBackupPath() { + return backupPath; + } + + public void setBackupPath(String backupPath) { + this.backupPath = backupPath == null ? null : backupPath.trim(); + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public String getStartScript() { + return startScript; + } + + public void setStartScript(String startScript) { + this.startScript = startScript == null ? null : startScript.trim(); + } + + public String getDeployScript() { + return deployScript; + } + + public void setDeployScript(String deployScript) { + this.deployScript = deployScript == null ? null : deployScript.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDatabase.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDatabase.java new file mode 100644 index 0000000..f6ab7d4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDatabase.java @@ -0,0 +1,98 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class MntDatabase implements Serializable { + private String dbId; + + private String name; + + private String jdbcUrl; + + private String userName; + + private String pwd; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public String getDbId() { + return dbId; + } + + public void setDbId(String dbId) { + this.dbId = dbId == null ? null : dbId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getJdbcUrl() { + return jdbcUrl; + } + + public void setJdbcUrl(String jdbcUrl) { + this.jdbcUrl = jdbcUrl == null ? null : jdbcUrl.trim(); + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName == null ? null : userName.trim(); + } + + public String getPwd() { + return pwd; + } + + public void setPwd(String pwd) { + this.pwd = pwd == null ? null : pwd.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeploy.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeploy.java new file mode 100644 index 0000000..12ed97c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeploy.java @@ -0,0 +1,68 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class MntDeploy implements Serializable { + private Long deployId; + + private Long appId; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getDeployId() { + return deployId; + } + + public void setDeployId(Long deployId) { + this.deployId = deployId; + } + + public Long getAppId() { + return appId; + } + + public void setAppId(Long appId) { + this.appId = appId; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployHistory.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployHistory.java new file mode 100644 index 0000000..1a53488 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployHistory.java @@ -0,0 +1,68 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class MntDeployHistory implements Serializable { + private String historyId; + + private String appName; + + private Date deployDate; + + private String deployUser; + + private String ip; + + private Long deployId; + + private static final long serialVersionUID = 1L; + + public String getHistoryId() { + return historyId; + } + + public void setHistoryId(String historyId) { + this.historyId = historyId == null ? null : historyId.trim(); + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName == null ? null : appName.trim(); + } + + public Date getDeployDate() { + return deployDate; + } + + public void setDeployDate(Date deployDate) { + this.deployDate = deployDate; + } + + public String getDeployUser() { + return deployUser; + } + + public void setDeployUser(String deployUser) { + this.deployUser = deployUser == null ? null : deployUser.trim(); + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip == null ? null : ip.trim(); + } + + public Long getDeployId() { + return deployId; + } + + public void setDeployId(Long deployId) { + this.deployId = deployId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployServerKey.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployServerKey.java new file mode 100644 index 0000000..7965263 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntDeployServerKey.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class MntDeployServerKey implements Serializable { + private Long deployId; + + private Long serverId; + + private static final long serialVersionUID = 1L; + + public Long getDeployId() { + return deployId; + } + + public void setDeployId(Long deployId) { + this.deployId = deployId; + } + + public Long getServerId() { + return serverId; + } + + public void setServerId(Long serverId) { + this.serverId = serverId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntServer.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntServer.java new file mode 100644 index 0000000..6b832a0 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/MntServer.java @@ -0,0 +1,108 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class MntServer implements Serializable { + private Long serverId; + + private String account; + + private String ip; + + private String name; + + private String password; + + private Integer port; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getServerId() { + return serverId; + } + + public void setServerId(Long serverId) { + this.serverId = serverId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account == null ? null : account.trim(); + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip == null ? null : ip.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password == null ? null : password.trim(); + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/OrderVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/OrderVo.java new file mode 100644 index 0000000..3934591 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/OrderVo.java @@ -0,0 +1,15 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.util.List; + +@Data +public class OrderVo { + private String masterId; + private String remark; + private String uuid; + private Integer shopId; + private String userId; + private Integer merchantId; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDuty.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDuty.java new file mode 100644 index 0000000..6b67abc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDuty.java @@ -0,0 +1,66 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Data +public class ShopUserDuty implements Serializable { + private Integer id; + + private Integer userId; + + private Date loginTime; + + private Integer orderNum; + + private BigDecimal amount; + + private Date loginOutTime; + + private String userName; + + private String status; + + private BigDecimal incomeAmount; + + private Integer shopId; + private Integer tokenId; + + private BigDecimal pettyCash; + + private BigDecimal cashAmount; + + private BigDecimal handAmount; + private BigDecimal returnAmount; + + private String equipment; + private String tradeDay; + private String type; + private List detailList; + + private static final long serialVersionUID = 1L; + + public ShopUserDuty() { + super(); + } + + public ShopUserDuty( Integer userId, Date loginTime, Integer orderNum, + BigDecimal amount, String userName, String status, BigDecimal incomeAmount, Integer shopId, BigDecimal pettyCash, BigDecimal cashAmount, BigDecimal handAmount, String equipment) { + this.userId = userId; + this.loginTime = loginTime; + this.orderNum = orderNum; + this.amount = amount; + this.userName = userName; + this.status = status; + this.incomeAmount = incomeAmount; + this.shopId = shopId; + this.pettyCash = pettyCash; + this.cashAmount = cashAmount; + this.handAmount = handAmount; + this.equipment = equipment; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyDetail.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyDetail.java new file mode 100644 index 0000000..87adc5e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyDetail.java @@ -0,0 +1,88 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class ShopUserDutyDetail implements Serializable { + private Integer id; + + private Integer dutyId; + + private Integer productId; + + private String productName; + + private Integer skuId; + + private String skuName; + + private Integer num; + + private BigDecimal amount; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getDutyId() { + return dutyId; + } + + public void setDutyId(Integer dutyId) { + this.dutyId = dutyId; + } + + public Integer getProductId() { + return productId; + } + + public void setProductId(Integer productId) { + this.productId = productId; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName == null ? null : productName.trim(); + } + + public Integer getSkuId() { + return skuId; + } + + public void setSkuId(Integer skuId) { + this.skuId = skuId; + } + + public String getSkuName() { + return skuName; + } + + public void setSkuName(String skuName) { + this.skuName = skuName == null ? null : skuName.trim(); + } + + public Integer getNum() { + return num; + } + + public void setNum(Integer num) { + this.num = num; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyPay.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyPay.java new file mode 100644 index 0000000..ffcefe3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ShopUserDutyPay.java @@ -0,0 +1,48 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class ShopUserDutyPay implements Serializable { + private Integer id; + + private Integer dutyId; + + private String type; + + private BigDecimal amount; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getDutyId() { + return dutyId; + } + + public void setDutyId(Integer dutyId) { + this.dutyId = dutyId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDept.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDept.java new file mode 100644 index 0000000..cc6f806 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDept.java @@ -0,0 +1,108 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysDept implements Serializable { + private Long deptId; + + private Long pid; + + private Integer subCount; + + private String name; + + private Integer deptSort; + + private Boolean enabled; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public Long getPid() { + return pid; + } + + public void setPid(Long pid) { + this.pid = pid; + } + + public Integer getSubCount() { + return subCount; + } + + public void setSubCount(Integer subCount) { + this.subCount = subCount; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Integer getDeptSort() { + return deptSort; + } + + public void setDeptSort(Integer deptSort) { + this.deptSort = deptSort; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDict.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDict.java new file mode 100644 index 0000000..2317260 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDict.java @@ -0,0 +1,78 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysDict implements Serializable { + private Long dictId; + + private String name; + + private String description; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getDictId() { + return dictId; + } + + public void setDictId(Long dictId) { + this.dictId = dictId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDictDetail.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDictDetail.java new file mode 100644 index 0000000..6e74012 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysDictDetail.java @@ -0,0 +1,98 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysDictDetail implements Serializable { + private Long detailId; + + private Long dictId; + + private String label; + + private String value; + + private Integer dictSort; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getDetailId() { + return detailId; + } + + public void setDetailId(Long detailId) { + this.detailId = detailId; + } + + public Long getDictId() { + return dictId; + } + + public void setDictId(Long dictId) { + this.dictId = dictId; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label == null ? null : label.trim(); + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + public Integer getDictSort() { + return dictSort; + } + + public void setDictSort(Integer dictSort) { + this.dictSort = dictSort; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysJob.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysJob.java new file mode 100644 index 0000000..3d231f9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysJob.java @@ -0,0 +1,88 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysJob implements Serializable { + private Long jobId; + + private String name; + + private Boolean enabled; + + private Integer jobSort; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public Integer getJobSort() { + return jobSort; + } + + public void setJobSort(Integer jobSort) { + this.jobSort = jobSort; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLog.java new file mode 100644 index 0000000..c86b582 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLog.java @@ -0,0 +1,108 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysLog implements Serializable { + private Long logId; + + private String description; + + private String logType; + + private String method; + + private String requestIp; + + private Long time; + + private String username; + + private String address; + + private String browser; + + private Date createTime; + + private static final long serialVersionUID = 1L; + + public Long getLogId() { + return logId; + } + + public void setLogId(Long logId) { + this.logId = logId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getLogType() { + return logType; + } + + public void setLogType(String logType) { + this.logType = logType == null ? null : logType.trim(); + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method == null ? null : method.trim(); + } + + public String getRequestIp() { + return requestIp; + } + + public void setRequestIp(String requestIp) { + this.requestIp = requestIp == null ? null : requestIp.trim(); + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username == null ? null : username.trim(); + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getBrowser() { + return browser; + } + + public void setBrowser(String browser) { + this.browser = browser == null ? null : browser.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLogWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLogWithBLOBs.java new file mode 100644 index 0000000..49d2899 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysLogWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class SysLogWithBLOBs extends SysLog implements Serializable { + private String params; + + private String exceptionDetail; + + private static final long serialVersionUID = 1L; + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params == null ? null : params.trim(); + } + + public String getExceptionDetail() { + return exceptionDetail; + } + + public void setExceptionDetail(String exceptionDetail) { + this.exceptionDetail = exceptionDetail == null ? null : exceptionDetail.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysMenu.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysMenu.java new file mode 100644 index 0000000..9fcc70a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysMenu.java @@ -0,0 +1,198 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysMenu implements Serializable { + private Long menuId; + + private Long pid; + + private Integer subCount; + + private Integer type; + + private String title; + + private String name; + + private String component; + + private Integer menuSort; + + private String icon; + + private String path; + + private Boolean iFrame; + + private Boolean cache; + + private Boolean hidden; + + private String permission; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private String activeMenu; + + private static final long serialVersionUID = 1L; + + public Long getMenuId() { + return menuId; + } + + public void setMenuId(Long menuId) { + this.menuId = menuId; + } + + public Long getPid() { + return pid; + } + + public void setPid(Long pid) { + this.pid = pid; + } + + public Integer getSubCount() { + return subCount; + } + + public void setSubCount(Integer subCount) { + this.subCount = subCount; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title == null ? null : title.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getComponent() { + return component; + } + + public void setComponent(String component) { + this.component = component == null ? null : component.trim(); + } + + public Integer getMenuSort() { + return menuSort; + } + + public void setMenuSort(Integer menuSort) { + this.menuSort = menuSort; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon == null ? null : icon.trim(); + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path == null ? null : path.trim(); + } + + public Boolean getiFrame() { + return iFrame; + } + + public void setiFrame(Boolean iFrame) { + this.iFrame = iFrame; + } + + public Boolean getCache() { + return cache; + } + + public void setCache(Boolean cache) { + this.cache = cache; + } + + public Boolean getHidden() { + return hidden; + } + + public void setHidden(Boolean hidden) { + this.hidden = hidden; + } + + public String getPermission() { + return permission; + } + + public void setPermission(String permission) { + this.permission = permission == null ? null : permission.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } + + public String getActiveMenu() { + return activeMenu; + } + + public void setActiveMenu(String activeMenu) { + this.activeMenu = activeMenu == null ? null : activeMenu.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzJob.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzJob.java new file mode 100644 index 0000000..81c4d6f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzJob.java @@ -0,0 +1,168 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysQuartzJob implements Serializable { + private Long jobId; + + private String beanName; + + private String cronExpression; + + private Boolean isPause; + + private String jobName; + + private String methodName; + + private String params; + + private String description; + + private String personInCharge; + + private String email; + + private String subTask; + + private Boolean pauseAfterFailure; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName == null ? null : beanName.trim(); + } + + public String getCronExpression() { + return cronExpression; + } + + public void setCronExpression(String cronExpression) { + this.cronExpression = cronExpression == null ? null : cronExpression.trim(); + } + + public Boolean getIsPause() { + return isPause; + } + + public void setIsPause(Boolean isPause) { + this.isPause = isPause; + } + + public String getJobName() { + return jobName; + } + + public void setJobName(String jobName) { + this.jobName = jobName == null ? null : jobName.trim(); + } + + public String getMethodName() { + return methodName; + } + + public void setMethodName(String methodName) { + this.methodName = methodName == null ? null : methodName.trim(); + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params == null ? null : params.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getPersonInCharge() { + return personInCharge; + } + + public void setPersonInCharge(String personInCharge) { + this.personInCharge = personInCharge == null ? null : personInCharge.trim(); + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email == null ? null : email.trim(); + } + + public String getSubTask() { + return subTask; + } + + public void setSubTask(String subTask) { + this.subTask = subTask == null ? null : subTask.trim(); + } + + public Boolean getPauseAfterFailure() { + return pauseAfterFailure; + } + + public void setPauseAfterFailure(Boolean pauseAfterFailure) { + this.pauseAfterFailure = pauseAfterFailure; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzLog.java new file mode 100644 index 0000000..6738591 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysQuartzLog.java @@ -0,0 +1,108 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysQuartzLog implements Serializable { + private Long logId; + + private String beanName; + + private Date createTime; + + private String cronExpression; + + private Boolean isSuccess; + + private String jobName; + + private String methodName; + + private String params; + + private Long time; + + private String exceptionDetail; + + private static final long serialVersionUID = 1L; + + public Long getLogId() { + return logId; + } + + public void setLogId(Long logId) { + this.logId = logId; + } + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName == null ? null : beanName.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCronExpression() { + return cronExpression; + } + + public void setCronExpression(String cronExpression) { + this.cronExpression = cronExpression == null ? null : cronExpression.trim(); + } + + public Boolean getIsSuccess() { + return isSuccess; + } + + public void setIsSuccess(Boolean isSuccess) { + this.isSuccess = isSuccess; + } + + public String getJobName() { + return jobName; + } + + public void setJobName(String jobName) { + this.jobName = jobName == null ? null : jobName.trim(); + } + + public String getMethodName() { + return methodName; + } + + public void setMethodName(String methodName) { + this.methodName = methodName == null ? null : methodName.trim(); + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params == null ? null : params.trim(); + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public String getExceptionDetail() { + return exceptionDetail; + } + + public void setExceptionDetail(String exceptionDetail) { + this.exceptionDetail = exceptionDetail == null ? null : exceptionDetail.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRole.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRole.java new file mode 100644 index 0000000..d2934d1 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRole.java @@ -0,0 +1,98 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysRole implements Serializable { + private Long roleId; + + private String name; + + private Integer level; + + private String description; + + private String dataScope; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Integer getLevel() { + return level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getDataScope() { + return dataScope; + } + + public void setDataScope(String dataScope) { + this.dataScope = dataScope == null ? null : dataScope.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesDeptsKey.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesDeptsKey.java new file mode 100644 index 0000000..ab28093 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesDeptsKey.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class SysRolesDeptsKey implements Serializable { + private Long roleId; + + private Long deptId; + + private static final long serialVersionUID = 1L; + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesMenusKey.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesMenusKey.java new file mode 100644 index 0000000..ff29281 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysRolesMenusKey.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class SysRolesMenusKey implements Serializable { + private Long menuId; + + private Long roleId; + + private static final long serialVersionUID = 1L; + + public Long getMenuId() { + return menuId; + } + + public void setMenuId(Long menuId) { + this.menuId = menuId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUser.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUser.java new file mode 100644 index 0000000..a4ae328 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUser.java @@ -0,0 +1,178 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class SysUser implements Serializable { + private Long userId; + + private Long deptId; + + private String username; + + private String nickName; + + private String gender; + + private String phone; + + private String email; + + private String avatarName; + + private String avatarPath; + + private String password; + + private Boolean isAdmin; + + private Long enabled; + + private String createBy; + + private String updateBy; + + private Date pwdResetTime; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username == null ? null : username.trim(); + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName == null ? null : nickName.trim(); + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender == null ? null : gender.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email == null ? null : email.trim(); + } + + public String getAvatarName() { + return avatarName; + } + + public void setAvatarName(String avatarName) { + this.avatarName = avatarName == null ? null : avatarName.trim(); + } + + public String getAvatarPath() { + return avatarPath; + } + + public void setAvatarPath(String avatarPath) { + this.avatarPath = avatarPath == null ? null : avatarPath.trim(); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password == null ? null : password.trim(); + } + + public Boolean getIsAdmin() { + return isAdmin; + } + + public void setIsAdmin(Boolean isAdmin) { + this.isAdmin = isAdmin; + } + + public Long getEnabled() { + return enabled; + } + + public void setEnabled(Long enabled) { + this.enabled = enabled; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.trim(); + } + + public Date getPwdResetTime() { + return pwdResetTime; + } + + public void setPwdResetTime(Date pwdResetTime) { + this.pwdResetTime = pwdResetTime; + } + + 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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersJobsKey.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersJobsKey.java new file mode 100644 index 0000000..1da1fd3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersJobsKey.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class SysUsersJobsKey implements Serializable { + private Long userId; + + private Long jobId; + + private static final long serialVersionUID = 1L; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersRolesKey.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersRolesKey.java new file mode 100644 index 0000000..65f4c13 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/SysUsersRolesKey.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class SysUsersRolesKey implements Serializable { + private Long userId; + + private Long roleId; + + private static final long serialVersionUID = 1L; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java new file mode 100644 index 0000000..ffafd53 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java @@ -0,0 +1,63 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class TbCashierCart implements Serializable { + private Integer id; + + private String masterId; + + private String orderId; + + private String refOrderId; + + private BigDecimal totalAmount; + + private String productId; + + private String coverImg; + + private String isSku; + + private String skuId; + + private String name; + + private BigDecimal salePrice; + private BigDecimal packFee; + + private Integer number; + + private Integer totalNumber; + + private Integer refundNumber; + + private String categoryId; + private String tradeDay; + + private String status; + + private Byte type; + + private String merchantId; + + private String shopId; + private String isPack; + private String isGift; + private String skuName; + private String uuid; + + private Long createdAt; + private Long pendingAt; + + private Long updatedAt; + private Integer userId; + private String tableId; + private TbProductSpec tbProductSpec; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java new file mode 100644 index 0000000..e6c8e56 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java @@ -0,0 +1,68 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class TbDeviceOperateInfo implements Serializable { + private Integer id; + + private String deviceno; + + private String type; + + private String shopId; + + private Date createtime; + + private String remark; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDeviceno() { + return deviceno; + } + + public void setDeviceno(String deviceno) { + this.deviceno = deviceno == null ? null : deviceno.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java new file mode 100644 index 0000000..0c6fc38 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java @@ -0,0 +1,249 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class TbDeviceStock implements Serializable { + private Integer id; + + private String code; + + private String snno; + + private String orderno; + + private BigDecimal price; + + private String type; + + private String groupno; + + private String buymercname; + + private String buymercid; + + private String actmercname; + + private String actmercid; + + private String status; + + private Date createtime; + + private String createby; + + private String delflag; + + private String remarks; + + private Date updatetime; + + private String deviceno; + + private Integer belonguserid; + + private Integer extractuserid; + + private String rolecode; + + private Date instocktime; + + private String transferstatus; + + private Date bindtime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getSnno() { + return snno; + } + + public void setSnno(String snno) { + this.snno = snno == null ? null : snno.trim(); + } + + public String getOrderno() { + return orderno; + } + + public void setOrderno(String orderno) { + this.orderno = orderno == null ? null : orderno.trim(); + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getGroupno() { + return groupno; + } + + public void setGroupno(String groupno) { + this.groupno = groupno == null ? null : groupno.trim(); + } + + public String getBuymercname() { + return buymercname; + } + + public void setBuymercname(String buymercname) { + this.buymercname = buymercname == null ? null : buymercname.trim(); + } + + public String getBuymercid() { + return buymercid; + } + + public void setBuymercid(String buymercid) { + this.buymercid = buymercid == null ? null : buymercid.trim(); + } + + public String getActmercname() { + return actmercname; + } + + public void setActmercname(String actmercname) { + this.actmercname = actmercname == null ? null : actmercname.trim(); + } + + public String getActmercid() { + return actmercid; + } + + public void setActmercid(String actmercid) { + this.actmercid = actmercid == null ? null : actmercid.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 String getCreateby() { + return createby; + } + + public void setCreateby(String createby) { + this.createby = createby == null ? null : createby.trim(); + } + + public String getDelflag() { + return delflag; + } + + public void setDelflag(String delflag) { + this.delflag = delflag == null ? null : delflag.trim(); + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks == null ? null : remarks.trim(); + } + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + public String getDeviceno() { + return deviceno; + } + + public void setDeviceno(String deviceno) { + this.deviceno = deviceno == null ? null : deviceno.trim(); + } + + public Integer getBelonguserid() { + return belonguserid; + } + + public void setBelonguserid(Integer belonguserid) { + this.belonguserid = belonguserid; + } + + public Integer getExtractuserid() { + return extractuserid; + } + + public void setExtractuserid(Integer extractuserid) { + this.extractuserid = extractuserid; + } + + public String getRolecode() { + return rolecode; + } + + public void setRolecode(String rolecode) { + this.rolecode = rolecode == null ? null : rolecode.trim(); + } + + public Date getInstocktime() { + return instocktime; + } + + public void setInstocktime(Date instocktime) { + this.instocktime = instocktime; + } + + public String getTransferstatus() { + return transferstatus; + } + + public void setTransferstatus(String transferstatus) { + this.transferstatus = transferstatus == null ? null : transferstatus.trim(); + } + + public Date getBindtime() { + return bindtime; + } + + public void setBindtime(Date bindtime) { + this.bindtime = bindtime; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java new file mode 100644 index 0000000..476ca5a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java @@ -0,0 +1,109 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class TbMemberIn implements Serializable { + private Integer id; + + private Integer userId; + + private Integer merchantId; + + private String code; + + private BigDecimal amount; + + private String status; + + private String orderNo; + + private String tradeNo; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getMerchantId() { + return merchantId; + } + + public void setMerchantId(Integer merchantId) { + this.merchantId = merchantId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo == null ? null : orderNo.trim(); + } + + public String getTradeNo() { + return tradeNo; + } + + public void setTradeNo(String tradeNo) { + this.tradeNo = tradeNo == null ? null : tradeNo.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantRegister.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantRegister.java new file mode 100644 index 0000000..3a7f2db --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantRegister.java @@ -0,0 +1,198 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbMerchantRegister implements Serializable { + private Integer id; + + private String registerCode; + + private String appCode; + + private String telephone; + + private String merchantId; + + private String shopId; + + private String type; + + private BigDecimal amount; + + private Integer periodYear; + + private String name; + + private String address; + + private String logo; + + private String industry; + + private String industryName; + + private Integer status; + + private Integer limitShopNumber; + + private String sourcePath; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getRegisterCode() { + return registerCode; + } + + public void setRegisterCode(String registerCode) { + this.registerCode = registerCode == null ? null : registerCode.trim(); + } + + public String getAppCode() { + return appCode; + } + + public void setAppCode(String appCode) { + this.appCode = appCode == null ? null : appCode.trim(); + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone == null ? null : telephone.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public Integer getPeriodYear() { + return periodYear; + } + + public void setPeriodYear(Integer periodYear) { + this.periodYear = periodYear; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getLogo() { + return logo; + } + + public void setLogo(String logo) { + this.logo = logo == null ? null : logo.trim(); + } + + public String getIndustry() { + return industry; + } + + public void setIndustry(String industry) { + this.industry = industry == null ? null : industry.trim(); + } + + public String getIndustryName() { + return industryName; + } + + public void setIndustryName(String industryName) { + this.industryName = industryName == null ? null : industryName.trim(); + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getLimitShopNumber() { + return limitShopNumber; + } + + public void setLimitShopNumber(Integer limitShopNumber) { + this.limitShopNumber = limitShopNumber; + } + + public String getSourcePath() { + return sourcePath; + } + + public void setSourcePath(String sourcePath) { + this.sourcePath = sourcePath == null ? null : sourcePath.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java new file mode 100644 index 0000000..896f67b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java @@ -0,0 +1,107 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbMerchantThirdApply implements Serializable { + private Integer id; + + private String type; + + private String appId; + + private Byte status; + + private String payPassword; + + private String applymentState; + + private Long createdAt; + + private Long updatedAt; + + private Integer shopId; + + private String appToken; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId == null ? null : appId.trim(); + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getPayPassword() { + return payPassword; + } + + public void setPayPassword(String payPassword) { + this.payPassword = payPassword == null ? null : payPassword.trim(); + } + + public String getApplymentState() { + return applymentState; + } + + public void setApplymentState(String applymentState) { + this.applymentState = applymentState == null ? null : applymentState.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public String getAppToken() { + return appToken; + } + + public void setAppToken(String appToken) { + this.appToken = appToken == null ? null : appToken.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java new file mode 100644 index 0000000..0d01cd3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java @@ -0,0 +1,42 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class TbOrderDetail implements Serializable { + private Integer id; + + private Integer orderId; + + private Integer shopId; + + private Integer productId; + + private Integer productSkuId; + + private Integer num; + + private String productName; + private String status; + + private String productSkuName; + + private String productImg; + + private Date createTime; + + private Date updateTime; + + private BigDecimal price; + + private BigDecimal priceAmount; + private BigDecimal packAmount; + + private String remark; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtend.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtend.java new file mode 100644 index 0000000..ee4aba8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtend.java @@ -0,0 +1,97 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbOrderExtend implements Serializable { + private Integer id; + + private String creatorSnap; + + private String cashierSnap; + + private String terminalSnap; + + private String tableParty; + + private String shopId; + + private Long createdAt; + + private Long updatedAt; + + private String shopSnap; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCreatorSnap() { + return creatorSnap; + } + + public void setCreatorSnap(String creatorSnap) { + this.creatorSnap = creatorSnap == null ? null : creatorSnap.trim(); + } + + public String getCashierSnap() { + return cashierSnap; + } + + public void setCashierSnap(String cashierSnap) { + this.cashierSnap = cashierSnap == null ? null : cashierSnap.trim(); + } + + public String getTerminalSnap() { + return terminalSnap; + } + + public void setTerminalSnap(String terminalSnap) { + this.terminalSnap = terminalSnap == null ? null : terminalSnap.trim(); + } + + public String getTableParty() { + return tableParty; + } + + public void setTableParty(String tableParty) { + this.tableParty = tableParty == null ? null : tableParty.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getShopSnap() { + return shopSnap; + } + + public void setShopSnap(String shopSnap) { + this.shopSnap = shopSnap == null ? null : shopSnap.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtendWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtendWithBLOBs.java new file mode 100644 index 0000000..d4269fe --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderExtendWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbOrderExtendWithBLOBs extends TbOrderExtend implements Serializable { + private String cartList; + + private String paymentList; + + private static final long serialVersionUID = 1L; + + public String getCartList() { + return cartList; + } + + public void setCartList(String cartList) { + this.cartList = cartList == null ? null : cartList.trim(); + } + + public String getPaymentList() { + return paymentList; + } + + public void setPaymentList(String paymentList) { + this.paymentList = paymentList == null ? null : paymentList.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java new file mode 100644 index 0000000..858e94f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java @@ -0,0 +1,165 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +@Data +public class TbOrderInfo implements Serializable { + private Integer id; + + //订单号 + private String orderNo; + + private BigDecimal settlementAmount; + + private BigDecimal packFee; + + private BigDecimal originAmount; + + private BigDecimal productAmount; + + private BigDecimal amount; + + private BigDecimal refundAmount; + + private String payType; + + private BigDecimal payAmount; + + private BigDecimal orderAmount; + + private BigDecimal freightAmount; + + private BigDecimal discountRatio; + + private BigDecimal discountAmount; + + private String tableId; + private String tableName; + + private BigDecimal smallChange; + + private String sendType; + + private String orderType; + private Integer tokenId; + + private String productType; + + private String status; + + private String billingId; + + private String merchantId; + + private String shopId; + + private Byte isVip; + + private String memberId; + private String userName; + private String memberName; + private String zdNo; + + private String userId; + private String imgUrl; + + private Integer productScore; + + private Integer deductScore; + + private String userCouponId; + + private BigDecimal userCouponAmount; + + private Byte refundAble; + + private Long paidTime; + + private Byte isEffect; + + private Byte isGroup; + + private Long updatedAt; + + private Long systemTime; + + private Long createdAt; + + private Byte isAccepted; + + private String payOrderNo; + private String tradeDay; + private Integer source; + private String remark; + private String masterId; + private List detailList; + + private static final long serialVersionUID = 1L; + public TbOrderInfo(){ + super(); + } + public TbOrderInfo( String orderNo, BigDecimal settlementAmount, BigDecimal packFee,BigDecimal originAmount, + BigDecimal productAmount,BigDecimal orderAmount, BigDecimal freightAmount,String tableId, String sendType, + String orderType,String merchantId,String shopId,String userId,Byte refundAble,String tradeDay,String masterId ) { + this.orderNo = orderNo; + this.masterId = masterId; + this.tradeDay = tradeDay; + this.settlementAmount = settlementAmount; + this.packFee = packFee; + this.originAmount = originAmount; + this.productAmount = productAmount; + this.orderAmount = orderAmount; + this.freightAmount = freightAmount; + this.tableId = tableId; + this.sendType = sendType; + this.orderType = orderType; + this.status = "unpaid"; + this.merchantId = merchantId; + this.shopId = shopId; + this.isVip = 0; + this.userId = userId; + this.refundAble = refundAble; + this.isEffect = 1; + this.systemTime = System.currentTimeMillis(); + this.createdAt = System.currentTimeMillis(); + this.isAccepted = 1; + } + + + + + public TbOrderInfo( String orderNo, BigDecimal settlementAmount, BigDecimal packFee,BigDecimal originAmount, + BigDecimal productAmount,BigDecimal orderAmount, BigDecimal freightAmount,String tableId, String sendType, + String orderType,String merchantId,String shopId,String userId,Byte refundAble,String tradeDay,String masterId,String status, + BigDecimal payAmount,String payType,String tableName) { + this.orderNo = orderNo; + this.masterId = masterId; + this.tradeDay = tradeDay; + this.settlementAmount = settlementAmount; + this.packFee = packFee; + this.originAmount = originAmount; + this.productAmount = productAmount; + this.orderAmount = orderAmount; + this.freightAmount = freightAmount; + this.payAmount=payAmount; + this.tableId = tableId; + this.sendType = sendType; + this.orderType = orderType; + this.status = status; + this.merchantId = merchantId; + this.shopId = shopId; + this.isVip = 0; + this.userId = userId; + this.refundAble = refundAble; + this.isEffect = 1; + this.systemTime = System.currentTimeMillis(); + this.createdAt = System.currentTimeMillis(); + this.isAccepted = 1; + this.payType=payType; + this.tableName=tableName; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderPayment.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderPayment.java new file mode 100644 index 0000000..a01999a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderPayment.java @@ -0,0 +1,198 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbOrderPayment implements Serializable { + private Integer id; + + private String payTypeId; + + private BigDecimal amount; + + private BigDecimal paidAmount; + + private BigDecimal hasRefundAmount; + + private String payName; + + private String payType; + + private BigDecimal received; + + private BigDecimal changeFee; + + private String merchantId; + + private String shopId; + + private String billingId; + + private String orderId; + + private String authCode; + + private String refundable; + + private Long createdAt; + + private Long updatedAt; + + private String tradeNumber; + + private String memberId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPayTypeId() { + return payTypeId; + } + + public void setPayTypeId(String payTypeId) { + this.payTypeId = payTypeId == null ? null : payTypeId.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getPaidAmount() { + return paidAmount; + } + + public void setPaidAmount(BigDecimal paidAmount) { + this.paidAmount = paidAmount; + } + + public BigDecimal getHasRefundAmount() { + return hasRefundAmount; + } + + public void setHasRefundAmount(BigDecimal hasRefundAmount) { + this.hasRefundAmount = hasRefundAmount; + } + + public String getPayName() { + return payName; + } + + public void setPayName(String payName) { + this.payName = payName == null ? null : payName.trim(); + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType == null ? null : payType.trim(); + } + + public BigDecimal getReceived() { + return received; + } + + public void setReceived(BigDecimal received) { + this.received = received; + } + + public BigDecimal getChangeFee() { + return changeFee; + } + + public void setChangeFee(BigDecimal changeFee) { + this.changeFee = changeFee; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getBillingId() { + return billingId; + } + + public void setBillingId(String billingId) { + this.billingId = billingId == null ? null : billingId.trim(); + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId == null ? null : orderId.trim(); + } + + public String getAuthCode() { + return authCode; + } + + public void setAuthCode(String authCode) { + this.authCode = authCode == null ? null : authCode.trim(); + } + + public String getRefundable() { + return refundable; + } + + public void setRefundable(String refundable) { + this.refundable = refundable == null ? null : refundable.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getTradeNumber() { + return tradeNumber; + } + + public void setTradeNumber(String tradeNumber) { + this.tradeNumber = tradeNumber == null ? null : tradeNumber.trim(); + } + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId == null ? null : memberId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java new file mode 100644 index 0000000..d3132cc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java @@ -0,0 +1,128 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class TbPlussDeviceGoods implements Serializable { + private Integer id; + + private String code; + + private String name; + + private String devicelogo; + + private String introdesc; + + private Integer sort; + + private Integer status; + + private Integer tagid; + + private String depositflag; + + private Date createtime; + + private Date updatetime; + + private String detail; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDevicelogo() { + return devicelogo; + } + + public void setDevicelogo(String devicelogo) { + this.devicelogo = devicelogo == null ? null : devicelogo.trim(); + } + + public String getIntrodesc() { + return introdesc; + } + + public void setIntrodesc(String introdesc) { + this.introdesc = introdesc == null ? null : introdesc.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getTagid() { + return tagid; + } + + public void setTagid(Integer tagid) { + this.tagid = tagid; + } + + public String getDepositflag() { + return depositflag; + } + + public void setDepositflag(String depositflag) { + this.depositflag = depositflag == null ? null : depositflag.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; + } + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail == null ? null : detail.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussShopStaff.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussShopStaff.java new file mode 100644 index 0000000..c79e4a1 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussShopStaff.java @@ -0,0 +1,128 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbPlussShopStaff implements Serializable { + private Integer id; + + private String code; + + private String name; + + private String account; + + private String password; + + private BigDecimal maxDiscountAmount; + + private Boolean status; + + private String employee; + + private String shopId; + + private Long createdAt; + + private Long updatedAt; + + private String type; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account == null ? null : account.trim(); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password == null ? null : password.trim(); + } + + public BigDecimal getMaxDiscountAmount() { + return maxDiscountAmount; + } + + public void setMaxDiscountAmount(BigDecimal maxDiscountAmount) { + this.maxDiscountAmount = maxDiscountAmount; + } + + public Boolean getStatus() { + return status; + } + + public void setStatus(Boolean status) { + this.status = status; + } + + public String getEmployee() { + return employee; + } + + public void setEmployee(String employee) { + this.employee = employee == null ? null : employee.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java new file mode 100644 index 0000000..3bdee44 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java @@ -0,0 +1,167 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbPrintMachine implements Serializable { + private Integer id; + + private String name; + + private String type; + + private String connectionType; + + private String address; + + private String port; + + private String subType; + + private Byte status; + + private String shopId; + + private String categoryIds; + + private String contentType; + + private Long createdAt; + + private Long updatedAt; + + private Integer sort; + + private String vendorId; + + private String productId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getConnectionType() { + return connectionType; + } + + public void setConnectionType(String connectionType) { + this.connectionType = connectionType == null ? null : connectionType.trim(); + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port == null ? null : port.trim(); + } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType == null ? null : subType.trim(); + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getCategoryIds() { + return categoryIds; + } + + public void setCategoryIds(String categoryIds) { + this.categoryIds = categoryIds == null ? null : categoryIds.trim(); + } + + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType == null ? null : contentType.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getVendorId() { + return vendorId; + } + + public void setVendorId(String vendorId) { + this.vendorId = vendorId == null ? null : vendorId.trim(); + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId == null ? null : productId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachineWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachineWithBLOBs.java new file mode 100644 index 0000000..c13b47f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachineWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbPrintMachineWithBLOBs extends TbPrintMachine implements Serializable { + private String config; + + private String categoryList; + + private static final long serialVersionUID = 1L; + + public String getConfig() { + return config; + } + + public void setConfig(String config) { + this.config = config == null ? null : config.trim(); + } + + public String getCategoryList() { + return categoryList; + } + + public void setCategoryList(String categoryList) { + this.categoryList = categoryList == null ? null : categoryList.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java new file mode 100644 index 0000000..4edda53 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java @@ -0,0 +1,645 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import org.springframework.data.annotation.Transient; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbProduct implements Serializable { + private Integer id; + + private String categoryId; + + private Integer specId; + + private String sourcePath; + + private Integer brandId; + + private String merchantId; + + private String shopId; + + private String name; + + private String shortTitle; + + private String type; + + private BigDecimal packFee; + + private BigDecimal lowPrice; + + private BigDecimal lowMemberPrice; + + private String unitId; + + private String unitSnap; + + private String coverImg; + + private String shareImg; + + private String videoCoverImg; + + private Integer sort; + + private Integer limitNumber; + + private Integer productScore; + + private Byte status; + + private String failMsg; + + private Byte isRecommend; + + private Byte isHot; + + private Byte isNew; + + private Byte isOnSale; + + private Byte isShow; + + private String typeEnum; + + private Byte isDistribute; + + private Byte isDel; + + private Byte isStock; + + private Byte isPauseSale; + + private Byte isFreeFreight; + + private Long freightId; + + private String strategyType; + + private Integer strategyId; + + private Byte isVip; + + private Byte isDelete; + + private Long createdAt; + + private Long updatedAt; + + private Double baseSalesNumber; + + private Integer realSalesNumber; + + private Integer salesNumber; + + private Integer thumbCount; + + private Integer storeCount; + + private Integer furnishMeal; + + private Integer furnishExpress; + + private Integer furnishDraw; + + private Integer furnishVir; + + private Byte isCombo; + + private Byte isShowCash; + + private Byte isShowMall; + + private Byte isNeedExamine; + + private Byte showOnMallStatus; + + private Long showOnMallTime; + + private String showOnMallErrorMsg; + + private Byte enableLabel; + + private String taxConfigId; + + private String specTableHeaders; + + @Transient + private int orderCount; + + + @Transient + private TbProductSpec tbProductSpec; + + @Transient + private TbProductSkuResult productSkuResult; + + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCategoryId() { + return categoryId; + } + + public void setCategoryId(String categoryId) { + this.categoryId = categoryId == null ? null : categoryId.trim(); + } + + public Integer getSpecId() { + return specId; + } + + public void setSpecId(Integer specId) { + this.specId = specId; + } + + public String getSourcePath() { + return sourcePath; + } + + public void setSourcePath(String sourcePath) { + this.sourcePath = sourcePath == null ? null : sourcePath.trim(); + } + + public Integer getBrandId() { + return brandId; + } + + public void setBrandId(Integer brandId) { + this.brandId = brandId; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getShortTitle() { + return shortTitle; + } + + public void setShortTitle(String shortTitle) { + this.shortTitle = shortTitle == null ? null : shortTitle.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public BigDecimal getPackFee() { + return packFee; + } + + public void setPackFee(BigDecimal packFee) { + this.packFee = packFee; + } + + public BigDecimal getLowPrice() { + return lowPrice; + } + + public void setLowPrice(BigDecimal lowPrice) { + this.lowPrice = lowPrice; + } + + public BigDecimal getLowMemberPrice() { + return lowMemberPrice; + } + + public void setLowMemberPrice(BigDecimal lowMemberPrice) { + this.lowMemberPrice = lowMemberPrice; + } + + public String getUnitId() { + return unitId; + } + + public void setUnitId(String unitId) { + this.unitId = unitId == null ? null : unitId.trim(); + } + + public String getUnitSnap() { + return unitSnap; + } + + public void setUnitSnap(String unitSnap) { + this.unitSnap = unitSnap == null ? null : unitSnap.trim(); + } + + public String getCoverImg() { + return coverImg; + } + + public void setCoverImg(String coverImg) { + this.coverImg = coverImg == null ? null : coverImg.trim(); + } + + public String getShareImg() { + return shareImg; + } + + public void setShareImg(String shareImg) { + this.shareImg = shareImg == null ? null : shareImg.trim(); + } + + public String getVideoCoverImg() { + return videoCoverImg; + } + + public void setVideoCoverImg(String videoCoverImg) { + this.videoCoverImg = videoCoverImg == null ? null : videoCoverImg.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Integer getLimitNumber() { + return limitNumber; + } + + public void setLimitNumber(Integer limitNumber) { + this.limitNumber = limitNumber; + } + + public Integer getProductScore() { + return productScore; + } + + public void setProductScore(Integer productScore) { + this.productScore = productScore; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getFailMsg() { + return failMsg; + } + + public void setFailMsg(String failMsg) { + this.failMsg = failMsg == null ? null : failMsg.trim(); + } + + public Byte getIsRecommend() { + return isRecommend; + } + + public void setIsRecommend(Byte isRecommend) { + this.isRecommend = isRecommend; + } + + public Byte getIsHot() { + return isHot; + } + + public void setIsHot(Byte isHot) { + this.isHot = isHot; + } + + public Byte getIsNew() { + return isNew; + } + + public void setIsNew(Byte isNew) { + this.isNew = isNew; + } + + public Byte getIsOnSale() { + return isOnSale; + } + + public void setIsOnSale(Byte isOnSale) { + this.isOnSale = isOnSale; + } + + public Byte getIsShow() { + return isShow; + } + + public void setIsShow(Byte isShow) { + this.isShow = isShow; + } + + public String getTypeEnum() { + return typeEnum; + } + + public void setTypeEnum(String typeEnum) { + this.typeEnum = typeEnum == null ? null : typeEnum.trim(); + } + + public Byte getIsDistribute() { + return isDistribute; + } + + public void setIsDistribute(Byte isDistribute) { + this.isDistribute = isDistribute; + } + + public Byte getIsDel() { + return isDel; + } + + public void setIsDel(Byte isDel) { + this.isDel = isDel; + } + + public Byte getIsStock() { + return isStock; + } + + public void setIsStock(Byte isStock) { + this.isStock = isStock; + } + + public Byte getIsPauseSale() { + return isPauseSale; + } + + public void setIsPauseSale(Byte isPauseSale) { + this.isPauseSale = isPauseSale; + } + + public Byte getIsFreeFreight() { + return isFreeFreight; + } + + public void setIsFreeFreight(Byte isFreeFreight) { + this.isFreeFreight = isFreeFreight; + } + + public Long getFreightId() { + return freightId; + } + + public void setFreightId(Long freightId) { + this.freightId = freightId; + } + + public String getStrategyType() { + return strategyType; + } + + public void setStrategyType(String strategyType) { + this.strategyType = strategyType == null ? null : strategyType.trim(); + } + + public Integer getStrategyId() { + return strategyId; + } + + public void setStrategyId(Integer strategyId) { + this.strategyId = strategyId; + } + + public Byte getIsVip() { + return isVip; + } + + public void setIsVip(Byte isVip) { + this.isVip = isVip; + } + + public Byte getIsDelete() { + return isDelete; + } + + public void setIsDelete(Byte isDelete) { + this.isDelete = isDelete; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Double getBaseSalesNumber() { + return baseSalesNumber; + } + + public void setBaseSalesNumber(Double baseSalesNumber) { + this.baseSalesNumber = baseSalesNumber; + } + + public Integer getRealSalesNumber() { + return realSalesNumber; + } + + public void setRealSalesNumber(Integer realSalesNumber) { + this.realSalesNumber = realSalesNumber; + } + + public Integer getSalesNumber() { + return salesNumber; + } + + public void setSalesNumber(Integer salesNumber) { + this.salesNumber = salesNumber; + } + + public Integer getThumbCount() { + return thumbCount; + } + + public void setThumbCount(Integer thumbCount) { + this.thumbCount = thumbCount; + } + + public Integer getStoreCount() { + return storeCount; + } + + public void setStoreCount(Integer storeCount) { + this.storeCount = storeCount; + } + + public Integer getFurnishMeal() { + return furnishMeal; + } + + public void setFurnishMeal(Integer furnishMeal) { + this.furnishMeal = furnishMeal; + } + + public Integer getFurnishExpress() { + return furnishExpress; + } + + public void setFurnishExpress(Integer furnishExpress) { + this.furnishExpress = furnishExpress; + } + + public Integer getFurnishDraw() { + return furnishDraw; + } + + public void setFurnishDraw(Integer furnishDraw) { + this.furnishDraw = furnishDraw; + } + + public Integer getFurnishVir() { + return furnishVir; + } + + public void setFurnishVir(Integer furnishVir) { + this.furnishVir = furnishVir; + } + + public Byte getIsCombo() { + return isCombo; + } + + public void setIsCombo(Byte isCombo) { + this.isCombo = isCombo; + } + + public Byte getIsShowCash() { + return isShowCash; + } + + public void setIsShowCash(Byte isShowCash) { + this.isShowCash = isShowCash; + } + + public Byte getIsShowMall() { + return isShowMall; + } + + public void setIsShowMall(Byte isShowMall) { + this.isShowMall = isShowMall; + } + + public Byte getIsNeedExamine() { + return isNeedExamine; + } + + public void setIsNeedExamine(Byte isNeedExamine) { + this.isNeedExamine = isNeedExamine; + } + + public Byte getShowOnMallStatus() { + return showOnMallStatus; + } + + public void setShowOnMallStatus(Byte showOnMallStatus) { + this.showOnMallStatus = showOnMallStatus; + } + + public Long getShowOnMallTime() { + return showOnMallTime; + } + + public void setShowOnMallTime(Long showOnMallTime) { + this.showOnMallTime = showOnMallTime; + } + + public String getShowOnMallErrorMsg() { + return showOnMallErrorMsg; + } + + public void setShowOnMallErrorMsg(String showOnMallErrorMsg) { + this.showOnMallErrorMsg = showOnMallErrorMsg == null ? null : showOnMallErrorMsg.trim(); + } + + public Byte getEnableLabel() { + return enableLabel; + } + + public void setEnableLabel(Byte enableLabel) { + this.enableLabel = enableLabel; + } + + public String getTaxConfigId() { + return taxConfigId; + } + + public void setTaxConfigId(String taxConfigId) { + this.taxConfigId = taxConfigId == null ? null : taxConfigId.trim(); + } + + public String getSpecTableHeaders() { + return specTableHeaders; + } + + public void setSpecTableHeaders(String specTableHeaders) { + this.specTableHeaders = specTableHeaders == null ? null : specTableHeaders.trim(); + } + + public TbProductSpec getTbProductSpec() { + return tbProductSpec; + } + + public void setTbProductSpec(TbProductSpec tbProductSpec) { + this.tbProductSpec = tbProductSpec; + } + + public TbProductSkuResult getProductSkuResult() { + return productSkuResult; + } + + public void setProductSkuResult(TbProductSkuResult productSkuResult) { + this.productSkuResult = productSkuResult; + } + + public int getOrderCount() { + return orderCount; + } + + public void setOrderCount(int orderCount) { + this.orderCount = orderCount; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductGroup.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductGroup.java new file mode 100644 index 0000000..5beedfd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductGroup.java @@ -0,0 +1,127 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductGroup implements Serializable { + private Integer id; + + private String name; + + private String merchantId; + + private Integer shopId; + + private String pic; + + private Byte isShow; + + private String detail; + + private String style; + + private Integer sort; + + private Long createdAt; + + private Long updatedAt; + + private String productIds; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public String getPic() { + return pic; + } + + public void setPic(String pic) { + this.pic = pic == null ? null : pic.trim(); + } + + public Byte getIsShow() { + return isShow; + } + + public void setIsShow(Byte isShow) { + this.isShow = isShow; + } + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail == null ? null : detail.trim(); + } + + public String getStyle() { + return style; + } + + public void setStyle(String style) { + this.style = style == null ? null : style.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getProductIds() { + return productIds; + } + + public void setProductIds(String productIds) { + this.productIds = productIds == null ? null : productIds.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java new file mode 100644 index 0000000..4cc6b43 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java @@ -0,0 +1,53 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class TbProductSku implements Serializable { + private Integer id; + + private String shopId; + + private String barCode; + + private String productId; + + private BigDecimal originPrice; + + private BigDecimal costPrice; + + private BigDecimal memberPrice; + + private BigDecimal mealPrice; + + private BigDecimal salePrice; + + private BigDecimal guidePrice; + + private BigDecimal strategyPrice; + + private Double stockNumber; + + private String coverImg; + + private Integer warnLine; + + private Double weight; + + private Float volume; + + private Double realSalesNumber; + + private BigDecimal firstShared; + + private BigDecimal secondShared; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuResult.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuResult.java new file mode 100644 index 0000000..7ced50b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuResult.java @@ -0,0 +1,67 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductSkuResult implements Serializable { + private Integer id; + + private String merchantId; + + private Long specId; + + private Long createdAt; + + private Long updatedAt; + + private String tagSnap; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public Long getSpecId() { + return specId; + } + + public void setSpecId(Long specId) { + this.specId = specId; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getTagSnap() { + return tagSnap; + } + + public void setTagSnap(String tagSnap) { + this.tagSnap = tagSnap == null ? null : tagSnap.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuWithBLOBs.java new file mode 100644 index 0000000..f2af49c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSkuWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductSkuWithBLOBs extends TbProductSku implements Serializable { + private String specInfo; + + private String specSnap; + + private static final long serialVersionUID = 1L; + + public String getSpecInfo() { + return specInfo; + } + + public void setSpecInfo(String specInfo) { + this.specInfo = specInfo == null ? null : specInfo.trim(); + } + + public String getSpecSnap() { + return specSnap; + } + + public void setSpecSnap(String specSnap) { + this.specSnap = specSnap == null ? null : specSnap.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSpec.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSpec.java new file mode 100644 index 0000000..44cc4e7 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSpec.java @@ -0,0 +1,97 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductSpec implements Serializable { + private Integer id; + + private String shopId; + + private String name; + + private String specTag; + + private String specTagDetail; + + private Integer sort; + + private Long createdAt; + + private Long updatedAt; + + private String specList; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getSpecTag() { + return specTag; + } + + public void setSpecTag(String specTag) { + this.specTag = specTag == null ? null : specTag.trim(); + } + + public String getSpecTagDetail() { + return specTagDetail; + } + + public void setSpecTagDetail(String specTagDetail) { + this.specTagDetail = specTagDetail == null ? null : specTagDetail.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getSpecList() { + return specList; + } + + public void setSpecList(String specList) { + this.specList = specList == null ? null : specList.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockDetail.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockDetail.java new file mode 100644 index 0000000..1328ac2 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockDetail.java @@ -0,0 +1,268 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbProductStockDetail implements Serializable { + private Long id; + + private String skuId; + + private String productId; + + private String productName; + + private Byte isStock; + + private String specSnap; + + private String unitName; + + private String shopId; + + private String recordId; + + private String batchNumber; + + private String sourcePath; + + private String orderId; + + private Byte subType; + + private String type; + + private Integer leftNumber; + + private Long stockTime; + + private Double stockNumber; + + private BigDecimal costAmount; + + private BigDecimal salesAmount; + + private String operator; + + private String remark; + + private String barCode; + + private String coverImg; + + private Long createdAt; + + private Long updatedAt; + + private String stockSnap; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getSkuId() { + return skuId; + } + + public void setSkuId(String skuId) { + this.skuId = skuId == null ? null : skuId.trim(); + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId == null ? null : productId.trim(); + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName == null ? null : productName.trim(); + } + + public Byte getIsStock() { + return isStock; + } + + public void setIsStock(Byte isStock) { + this.isStock = isStock; + } + + public String getSpecSnap() { + return specSnap; + } + + public void setSpecSnap(String specSnap) { + this.specSnap = specSnap == null ? null : specSnap.trim(); + } + + public String getUnitName() { + return unitName; + } + + public void setUnitName(String unitName) { + this.unitName = unitName == null ? null : unitName.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getRecordId() { + return recordId; + } + + public void setRecordId(String recordId) { + this.recordId = recordId == null ? null : recordId.trim(); + } + + public String getBatchNumber() { + return batchNumber; + } + + public void setBatchNumber(String batchNumber) { + this.batchNumber = batchNumber == null ? null : batchNumber.trim(); + } + + public String getSourcePath() { + return sourcePath; + } + + public void setSourcePath(String sourcePath) { + this.sourcePath = sourcePath == null ? null : sourcePath.trim(); + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId == null ? null : orderId.trim(); + } + + public Byte getSubType() { + return subType; + } + + public void setSubType(Byte subType) { + this.subType = subType; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public Integer getLeftNumber() { + return leftNumber; + } + + public void setLeftNumber(Integer leftNumber) { + this.leftNumber = leftNumber; + } + + public Long getStockTime() { + return stockTime; + } + + public void setStockTime(Long stockTime) { + this.stockTime = stockTime; + } + + public Double getStockNumber() { + return stockNumber; + } + + public void setStockNumber(Double stockNumber) { + this.stockNumber = stockNumber; + } + + public BigDecimal getCostAmount() { + return costAmount; + } + + public void setCostAmount(BigDecimal costAmount) { + this.costAmount = costAmount; + } + + public BigDecimal getSalesAmount() { + return salesAmount; + } + + public void setSalesAmount(BigDecimal salesAmount) { + this.salesAmount = salesAmount; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator == null ? null : operator.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode == null ? null : barCode.trim(); + } + + public String getCoverImg() { + return coverImg; + } + + public void setCoverImg(String coverImg) { + this.coverImg = coverImg == null ? null : coverImg.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getStockSnap() { + return stockSnap; + } + + public void setStockSnap(String stockSnap) { + this.stockSnap = stockSnap == null ? null : stockSnap.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockOperate.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockOperate.java new file mode 100644 index 0000000..51b902b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductStockOperate.java @@ -0,0 +1,147 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductStockOperate implements Serializable { + private Integer id; + + private String shopId; + + private String type; + + private Byte subType; + + private String batchNumber; + + private String remark; + + private Long stockTime; + + private String operatorSnap; + + private Long createdAt; + + private Long updatedAt; + + private String purveyorId; + + private String purveyorName; + + private String status; + + private String stockSnap; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public Byte getSubType() { + return subType; + } + + public void setSubType(Byte subType) { + this.subType = subType; + } + + public String getBatchNumber() { + return batchNumber; + } + + public void setBatchNumber(String batchNumber) { + this.batchNumber = batchNumber == null ? null : batchNumber.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getStockTime() { + return stockTime; + } + + public void setStockTime(Long stockTime) { + this.stockTime = stockTime; + } + + public String getOperatorSnap() { + return operatorSnap; + } + + public void setOperatorSnap(String operatorSnap) { + this.operatorSnap = operatorSnap == null ? null : operatorSnap.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getPurveyorId() { + return purveyorId; + } + + public void setPurveyorId(String purveyorId) { + this.purveyorId = purveyorId == null ? null : purveyorId.trim(); + } + + public String getPurveyorName() { + return purveyorName; + } + + public void setPurveyorName(String purveyorName) { + this.purveyorName = purveyorName == null ? null : purveyorName.trim(); + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getStockSnap() { + return stockSnap; + } + + public void setStockSnap(String stockSnap) { + this.stockSnap = stockSnap == null ? null : stockSnap.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductWithBLOBs.java new file mode 100644 index 0000000..7e7b701 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductWithBLOBs.java @@ -0,0 +1,67 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbProductWithBLOBs extends TbProduct implements Serializable { + private String images; + + private String video; + + private String notice; + + private String groupSnap; + + private String specInfo; + + private String selectSpec; + + private static final long serialVersionUID = 1L; + + public String getImages() { + return images; + } + + public void setImages(String images) { + this.images = images == null ? null : images.trim(); + } + + public String getVideo() { + return video; + } + + public void setVideo(String video) { + this.video = video == null ? null : video.trim(); + } + + public String getNotice() { + return notice; + } + + public void setNotice(String notice) { + this.notice = notice == null ? null : notice.trim(); + } + + public String getGroupSnap() { + return groupSnap; + } + + public void setGroupSnap(String groupSnap) { + this.groupSnap = groupSnap == null ? null : groupSnap.trim(); + } + + public String getSpecInfo() { + return specInfo; + } + + public void setSpecInfo(String specInfo) { + this.specInfo = specInfo == null ? null : specInfo.trim(); + } + + public String getSelectSpec() { + return selectSpec; + } + + public void setSelectSpec(String selectSpec) { + this.selectSpec = selectSpec == null ? null : selectSpec.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java new file mode 100644 index 0000000..1a38a26 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java @@ -0,0 +1,207 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbReceiptSales implements Serializable { + private Integer id; + + private String title; + + private String logo; + + private Boolean showContactInfo; + + private Boolean showMember; + + private Boolean showMemberCode; + + private Boolean showMemberScore; + + private Boolean showMemberWallet; + + private String footerRemark; + + private Boolean showCashCharge; + + private Boolean showSerialNo; + + private Boolean bigSerialNo; + + private String headerText; + + private String headerTextAlign; + + private String footerText; + + private String footerTextAlign; + + private String footerImage; + + private String prePrint; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title == null ? null : title.trim(); + } + + public String getLogo() { + return logo; + } + + public void setLogo(String logo) { + this.logo = logo == null ? null : logo.trim(); + } + + public Boolean getShowContactInfo() { + return showContactInfo; + } + + public void setShowContactInfo(Boolean showContactInfo) { + this.showContactInfo = showContactInfo; + } + + public Boolean getShowMember() { + return showMember; + } + + public void setShowMember(Boolean showMember) { + this.showMember = showMember; + } + + public Boolean getShowMemberCode() { + return showMemberCode; + } + + public void setShowMemberCode(Boolean showMemberCode) { + this.showMemberCode = showMemberCode; + } + + public Boolean getShowMemberScore() { + return showMemberScore; + } + + public void setShowMemberScore(Boolean showMemberScore) { + this.showMemberScore = showMemberScore; + } + + public Boolean getShowMemberWallet() { + return showMemberWallet; + } + + public void setShowMemberWallet(Boolean showMemberWallet) { + this.showMemberWallet = showMemberWallet; + } + + public String getFooterRemark() { + return footerRemark; + } + + public void setFooterRemark(String footerRemark) { + this.footerRemark = footerRemark == null ? null : footerRemark.trim(); + } + + public Boolean getShowCashCharge() { + return showCashCharge; + } + + public void setShowCashCharge(Boolean showCashCharge) { + this.showCashCharge = showCashCharge; + } + + public Boolean getShowSerialNo() { + return showSerialNo; + } + + public void setShowSerialNo(Boolean showSerialNo) { + this.showSerialNo = showSerialNo; + } + + public Boolean getBigSerialNo() { + return bigSerialNo; + } + + public void setBigSerialNo(Boolean bigSerialNo) { + this.bigSerialNo = bigSerialNo; + } + + public String getHeaderText() { + return headerText; + } + + public void setHeaderText(String headerText) { + this.headerText = headerText == null ? null : headerText.trim(); + } + + public String getHeaderTextAlign() { + return headerTextAlign; + } + + public void setHeaderTextAlign(String headerTextAlign) { + this.headerTextAlign = headerTextAlign == null ? null : headerTextAlign.trim(); + } + + public String getFooterText() { + return footerText; + } + + public void setFooterText(String footerText) { + this.footerText = footerText == null ? null : footerText.trim(); + } + + public String getFooterTextAlign() { + return footerTextAlign; + } + + public void setFooterTextAlign(String footerTextAlign) { + this.footerTextAlign = footerTextAlign == null ? null : footerTextAlign.trim(); + } + + public String getFooterImage() { + return footerImage; + } + + public void setFooterImage(String footerImage) { + this.footerImage = footerImage == null ? null : footerImage.trim(); + } + + public String getPrePrint() { + return prePrint; + } + + public void setPrePrint(String prePrint) { + this.prePrint = prePrint == null ? null : prePrint.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java new file mode 100644 index 0000000..9a4bcbd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java @@ -0,0 +1,148 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbRenewalsPayLog implements Serializable { + private Integer id; + + private String payType; + + private String shopId; + + private String orderId; + + private String openId; + + private String userId; + + private String transactionId; + + private BigDecimal amount; + + private Byte status; + + private String remark; + + private String attach; + + private Long expiredAt; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType == null ? null : payType.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId == null ? null : orderId.trim(); + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId == null ? null : openId.trim(); + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId == null ? null : transactionId.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getAttach() { + return attach; + } + + public void setAttach(String attach) { + this.attach = attach == null ? null : attach.trim(); + } + + public Long getExpiredAt() { + return expiredAt; + } + + public void setExpiredAt(Long expiredAt) { + this.expiredAt = expiredAt; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopArea.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopArea.java new file mode 100644 index 0000000..2d21e14 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopArea.java @@ -0,0 +1,97 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopArea implements Serializable { + private Integer id; + + private Integer shopId; + + private Integer sort; + + private String name; + + private Integer price; + + private String capacityRange; + + private Long createdAt; + + private Long updatedAt; + + private String view; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Integer getPrice() { + return price; + } + + public void setPrice(Integer price) { + this.price = price; + } + + public String getCapacityRange() { + return capacityRange; + } + + public void setCapacityRange(String capacityRange) { + this.capacityRange = capacityRange == null ? null : capacityRange.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getView() { + return view; + } + + public void setView(String view) { + this.view = view == null ? null : view.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java new file mode 100644 index 0000000..1a6d486 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java @@ -0,0 +1,37 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopCashSpread implements Serializable { + private Integer id; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java new file mode 100644 index 0000000..ac6cc8a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java @@ -0,0 +1,57 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopCashSpreadWithBLOBs extends TbShopCashSpread implements Serializable { + private String saleReceipt; + + private String triplicateReceipt; + + private String screenConfig; + + private String tagConfig; + + private String scaleConfig; + + private static final long serialVersionUID = 1L; + + public String getSaleReceipt() { + return saleReceipt; + } + + public void setSaleReceipt(String saleReceipt) { + this.saleReceipt = saleReceipt == null ? null : saleReceipt.trim(); + } + + public String getTriplicateReceipt() { + return triplicateReceipt; + } + + public void setTriplicateReceipt(String triplicateReceipt) { + this.triplicateReceipt = triplicateReceipt == null ? null : triplicateReceipt.trim(); + } + + public String getScreenConfig() { + return screenConfig; + } + + public void setScreenConfig(String screenConfig) { + this.screenConfig = screenConfig == null ? null : screenConfig.trim(); + } + + public String getTagConfig() { + return tagConfig; + } + + public void setTagConfig(String tagConfig) { + this.tagConfig = tagConfig == null ? null : tagConfig.trim(); + } + + public String getScaleConfig() { + return scaleConfig; + } + + public void setScaleConfig(String scaleConfig) { + this.scaleConfig = scaleConfig == null ? null : scaleConfig.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCategory.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCategory.java new file mode 100644 index 0000000..03b54f6 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCategory.java @@ -0,0 +1,157 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopCategory implements Serializable { + private Integer id; + + private String name; + + private String shortName; + + private Integer tree; + + private String pid; + + private String pic; + + private String merchantId; + + private String shopId; + + private String style; + + private Byte isShow; + + private String detail; + + private Integer sort; + + private String keyWord; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName == null ? null : shortName.trim(); + } + + public Integer getTree() { + return tree; + } + + public void setTree(Integer tree) { + this.tree = tree; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid == null ? null : pid.trim(); + } + + public String getPic() { + return pic; + } + + public void setPic(String pic) { + this.pic = pic == null ? null : pic.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getStyle() { + return style; + } + + public void setStyle(String style) { + this.style = style == null ? null : style.trim(); + } + + public Byte getIsShow() { + return isShow; + } + + public void setIsShow(Byte isShow) { + this.isShow = isShow; + } + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail == null ? null : detail.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getKeyWord() { + return keyWord; + } + + public void setKeyWord(String keyWord) { + this.keyWord = keyWord == null ? null : keyWord.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java new file mode 100644 index 0000000..4b71c95 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java @@ -0,0 +1,208 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbShopCurrency implements Serializable { + private Integer id; + + private String shopId; + + private BigDecimal prepareAmount; + + private String currency; + + private Byte decimalsDigits; + + private String discountRound; + + private String merchantId; + + private Byte smallChange; + + private Byte enableCustomDiscount; + + private BigDecimal maxDiscount; + + private Double maxPercent; + + private String bizDuration; + + private Byte allowWebPay; + + private Byte isAutoToZero; + + private Byte isIncludeTaxPrice; + + private String taxNumber; + + private Long createdAt; + + private Long updatedAt; + + private Byte autoLockScreen; + + private Byte voiceNotification; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public BigDecimal getPrepareAmount() { + return prepareAmount; + } + + public void setPrepareAmount(BigDecimal prepareAmount) { + this.prepareAmount = prepareAmount; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency == null ? null : currency.trim(); + } + + public Byte getDecimalsDigits() { + return decimalsDigits; + } + + public void setDecimalsDigits(Byte decimalsDigits) { + this.decimalsDigits = decimalsDigits; + } + + public String getDiscountRound() { + return discountRound; + } + + public void setDiscountRound(String discountRound) { + this.discountRound = discountRound == null ? null : discountRound.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public Byte getSmallChange() { + return smallChange; + } + + public void setSmallChange(Byte smallChange) { + this.smallChange = smallChange; + } + + public Byte getEnableCustomDiscount() { + return enableCustomDiscount; + } + + public void setEnableCustomDiscount(Byte enableCustomDiscount) { + this.enableCustomDiscount = enableCustomDiscount; + } + + public BigDecimal getMaxDiscount() { + return maxDiscount; + } + + public void setMaxDiscount(BigDecimal maxDiscount) { + this.maxDiscount = maxDiscount; + } + + public Double getMaxPercent() { + return maxPercent; + } + + public void setMaxPercent(Double maxPercent) { + this.maxPercent = maxPercent; + } + + public String getBizDuration() { + return bizDuration; + } + + public void setBizDuration(String bizDuration) { + this.bizDuration = bizDuration == null ? null : bizDuration.trim(); + } + + public Byte getAllowWebPay() { + return allowWebPay; + } + + public void setAllowWebPay(Byte allowWebPay) { + this.allowWebPay = allowWebPay; + } + + public Byte getIsAutoToZero() { + return isAutoToZero; + } + + public void setIsAutoToZero(Byte isAutoToZero) { + this.isAutoToZero = isAutoToZero; + } + + public Byte getIsIncludeTaxPrice() { + return isIncludeTaxPrice; + } + + public void setIsIncludeTaxPrice(Byte isIncludeTaxPrice) { + this.isIncludeTaxPrice = isIncludeTaxPrice; + } + + public String getTaxNumber() { + return taxNumber; + } + + public void setTaxNumber(String taxNumber) { + this.taxNumber = taxNumber == null ? null : taxNumber.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getAutoLockScreen() { + return autoLockScreen; + } + + public void setAutoLockScreen(Byte autoLockScreen) { + this.autoLockScreen = autoLockScreen; + } + + public Byte getVoiceNotification() { + return voiceNotification; + } + + public void setVoiceNotification(Byte voiceNotification) { + this.voiceNotification = voiceNotification; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java new file mode 100644 index 0000000..5fc056b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopCurrencyWithBLOBs extends TbShopCurrency implements Serializable { + private String discountConfigs; + + private String serviceCharge; + + private static final long serialVersionUID = 1L; + + public String getDiscountConfigs() { + return discountConfigs; + } + + public void setDiscountConfigs(String discountConfigs) { + this.discountConfigs = discountConfigs == null ? null : discountConfigs.trim(); + } + + public String getServiceCharge() { + return serviceCharge; + } + + public void setServiceCharge(String serviceCharge) { + this.serviceCharge = serviceCharge == null ? null : serviceCharge.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java new file mode 100644 index 0000000..c311e8a --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java @@ -0,0 +1,448 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbShopInfo implements Serializable { + private Integer id; + + private String account; + + private String shopCode; + + private String subTitle; + + private String merchantId; + + private String shopName; + + private String chainName; + + private String backImg; + + private String frontImg; + + private String contactName; + + private String phone; + + private String logo; + + private Byte isDeposit; + + private Byte isSupply; + + private String coverImg; + + private String shareImg; + + private String detail; + + private String lat; + + private String lng; + + private String mchId; + + private String registerType; + + private Byte isWxMaIndependent; + + private String address; + + private String city; + + private String type; + + private String industry; + + private String industryName; + + private String businessTime; + + private String postTime; + + private BigDecimal postAmountLine; + + private Byte onSale; + + private Byte settleType; + + private String settleTime; + + private Integer enterAt; + + private Long expireAt; + + private Byte status; + + private Float average; + + private Integer orderWaitPayMinute; + + private Integer supportDeviceNumber; + + private Byte distributeLevel; + + private Long createdAt; + + private Long updatedAt; + + private String proxyId; + + private String view; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account == null ? null : account.trim(); + } + + public String getShopCode() { + return shopCode; + } + + public void setShopCode(String shopCode) { + this.shopCode = shopCode == null ? null : shopCode.trim(); + } + + public String getSubTitle() { + return subTitle; + } + + public void setSubTitle(String subTitle) { + this.subTitle = subTitle == null ? null : subTitle.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopName() { + return shopName; + } + + public void setShopName(String shopName) { + this.shopName = shopName == null ? null : shopName.trim(); + } + + public String getChainName() { + return chainName; + } + + public void setChainName(String chainName) { + this.chainName = chainName == null ? null : chainName.trim(); + } + + public String getBackImg() { + return backImg; + } + + public void setBackImg(String backImg) { + this.backImg = backImg == null ? null : backImg.trim(); + } + + public String getFrontImg() { + return frontImg; + } + + public void setFrontImg(String frontImg) { + this.frontImg = frontImg == null ? null : frontImg.trim(); + } + + public String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName == null ? null : contactName.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getLogo() { + return logo; + } + + public void setLogo(String logo) { + this.logo = logo == null ? null : logo.trim(); + } + + public Byte getIsDeposit() { + return isDeposit; + } + + public void setIsDeposit(Byte isDeposit) { + this.isDeposit = isDeposit; + } + + public Byte getIsSupply() { + return isSupply; + } + + public void setIsSupply(Byte isSupply) { + this.isSupply = isSupply; + } + + public String getCoverImg() { + return coverImg; + } + + public void setCoverImg(String coverImg) { + this.coverImg = coverImg == null ? null : coverImg.trim(); + } + + public String getShareImg() { + return shareImg; + } + + public void setShareImg(String shareImg) { + this.shareImg = shareImg == null ? null : shareImg.trim(); + } + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail == null ? null : detail.trim(); + } + + public String getLat() { + return lat; + } + + public void setLat(String lat) { + this.lat = lat == null ? null : lat.trim(); + } + + public String getLng() { + return lng; + } + + public void setLng(String lng) { + this.lng = lng == null ? null : lng.trim(); + } + + public String getMchId() { + return mchId; + } + + public void setMchId(String mchId) { + this.mchId = mchId == null ? null : mchId.trim(); + } + + public String getRegisterType() { + return registerType; + } + + public void setRegisterType(String registerType) { + this.registerType = registerType == null ? null : registerType.trim(); + } + + public Byte getIsWxMaIndependent() { + return isWxMaIndependent; + } + + public void setIsWxMaIndependent(Byte isWxMaIndependent) { + this.isWxMaIndependent = isWxMaIndependent; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city == null ? null : city.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getIndustry() { + return industry; + } + + public void setIndustry(String industry) { + this.industry = industry == null ? null : industry.trim(); + } + + public String getIndustryName() { + return industryName; + } + + public void setIndustryName(String industryName) { + this.industryName = industryName == null ? null : industryName.trim(); + } + + public String getBusinessTime() { + return businessTime; + } + + public void setBusinessTime(String businessTime) { + this.businessTime = businessTime == null ? null : businessTime.trim(); + } + + public String getPostTime() { + return postTime; + } + + public void setPostTime(String postTime) { + this.postTime = postTime == null ? null : postTime.trim(); + } + + public BigDecimal getPostAmountLine() { + return postAmountLine; + } + + public void setPostAmountLine(BigDecimal postAmountLine) { + this.postAmountLine = postAmountLine; + } + + public Byte getOnSale() { + return onSale; + } + + public void setOnSale(Byte onSale) { + this.onSale = onSale; + } + + public Byte getSettleType() { + return settleType; + } + + public void setSettleType(Byte settleType) { + this.settleType = settleType; + } + + public String getSettleTime() { + return settleTime; + } + + public void setSettleTime(String settleTime) { + this.settleTime = settleTime == null ? null : settleTime.trim(); + } + + public Integer getEnterAt() { + return enterAt; + } + + public void setEnterAt(Integer enterAt) { + this.enterAt = enterAt; + } + + public Long getExpireAt() { + return expireAt; + } + + public void setExpireAt(Long expireAt) { + this.expireAt = expireAt; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public Float getAverage() { + return average; + } + + public void setAverage(Float average) { + this.average = average; + } + + public Integer getOrderWaitPayMinute() { + return orderWaitPayMinute; + } + + public void setOrderWaitPayMinute(Integer orderWaitPayMinute) { + this.orderWaitPayMinute = orderWaitPayMinute; + } + + public Integer getSupportDeviceNumber() { + return supportDeviceNumber; + } + + public void setSupportDeviceNumber(Integer supportDeviceNumber) { + this.supportDeviceNumber = supportDeviceNumber; + } + + public Byte getDistributeLevel() { + return distributeLevel; + } + + public void setDistributeLevel(Byte distributeLevel) { + this.distributeLevel = distributeLevel; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getProxyId() { + return proxyId; + } + + public void setProxyId(String proxyId) { + this.proxyId = proxyId == null ? null : proxyId.trim(); + } + + public String getView() { + return view; + } + + public void setView(String view) { + this.view = view == null ? null : view.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopOnline.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopOnline.java new file mode 100644 index 0000000..e77dcc7 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopOnline.java @@ -0,0 +1,68 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class TbShopOnline implements Serializable { + private Integer shopId; + + private Date startTime; + + private Date endTime; + + private String status; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + 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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPayType.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPayType.java new file mode 100644 index 0000000..fef6cc6 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPayType.java @@ -0,0 +1,147 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopPayType implements Serializable { + private Integer id; + + private String payType; + + private String payName; + + private Byte isShowShortcut; + + private String shopId; + + private Byte isRefundable; + + private Byte isOpenCashDrawer; + + private Byte isSystem; + + private Byte isIdeal; + + private Byte isDisplay; + + private Integer sorts; + + private Long createdAt; + + private Long updatedAt; + + private String icon; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType == null ? null : payType.trim(); + } + + public String getPayName() { + return payName; + } + + public void setPayName(String payName) { + this.payName = payName == null ? null : payName.trim(); + } + + public Byte getIsShowShortcut() { + return isShowShortcut; + } + + public void setIsShowShortcut(Byte isShowShortcut) { + this.isShowShortcut = isShowShortcut; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Byte getIsRefundable() { + return isRefundable; + } + + public void setIsRefundable(Byte isRefundable) { + this.isRefundable = isRefundable; + } + + public Byte getIsOpenCashDrawer() { + return isOpenCashDrawer; + } + + public void setIsOpenCashDrawer(Byte isOpenCashDrawer) { + this.isOpenCashDrawer = isOpenCashDrawer; + } + + public Byte getIsSystem() { + return isSystem; + } + + public void setIsSystem(Byte isSystem) { + this.isSystem = isSystem; + } + + public Byte getIsIdeal() { + return isIdeal; + } + + public void setIsIdeal(Byte isIdeal) { + this.isIdeal = isIdeal; + } + + public Byte getIsDisplay() { + return isDisplay; + } + + public void setIsDisplay(Byte isDisplay) { + this.isDisplay = isDisplay; + } + + public Integer getSorts() { + return sorts; + } + + public void setSorts(Integer sorts) { + this.sorts = sorts; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon == null ? null : icon.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyor.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyor.java new file mode 100644 index 0000000..8e8c213 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyor.java @@ -0,0 +1,137 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopPurveyor implements Serializable { + private Integer id; + + private String shopId; + + private Integer sort; + + private String name; + + private String purveyorName; + + private String purveyorTelephone; + + private Integer period; + + private String address; + + private String tip; + + private String remark; + + private Long createdAt; + + private Long updatedAt; + + private Long lastTransactAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPurveyorName() { + return purveyorName; + } + + public void setPurveyorName(String purveyorName) { + this.purveyorName = purveyorName == null ? null : purveyorName.trim(); + } + + public String getPurveyorTelephone() { + return purveyorTelephone; + } + + public void setPurveyorTelephone(String purveyorTelephone) { + this.purveyorTelephone = purveyorTelephone == null ? null : purveyorTelephone.trim(); + } + + public Integer getPeriod() { + return period; + } + + public void setPeriod(Integer period) { + this.period = period; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getTip() { + return tip; + } + + public void setTip(String tip) { + this.tip = tip == null ? null : tip.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getLastTransactAt() { + return lastTransactAt; + } + + public void setLastTransactAt(Long lastTransactAt) { + this.lastTransactAt = lastTransactAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyorTransact.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyorTransact.java new file mode 100644 index 0000000..d90c6cc --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopPurveyorTransact.java @@ -0,0 +1,138 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbShopPurveyorTransact implements Serializable { + private Integer id; + + private String shopId; + + private String purveyorName; + + private String purveyorId; + + private Byte status; + + private String remark; + + private Long createdAt; + + private Long updatedAt; + + private BigDecimal totalAmount; + + private BigDecimal waitAmount; + + private BigDecimal paidAmount; + + private Long paidAt; + + private String type; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getPurveyorName() { + return purveyorName; + } + + public void setPurveyorName(String purveyorName) { + this.purveyorName = purveyorName == null ? null : purveyorName.trim(); + } + + public String getPurveyorId() { + return purveyorId; + } + + public void setPurveyorId(String purveyorId) { + this.purveyorId = purveyorId == null ? null : purveyorId.trim(); + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public BigDecimal getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(BigDecimal totalAmount) { + this.totalAmount = totalAmount; + } + + public BigDecimal getWaitAmount() { + return waitAmount; + } + + public void setWaitAmount(BigDecimal waitAmount) { + this.waitAmount = waitAmount; + } + + public BigDecimal getPaidAmount() { + return paidAmount; + } + + public void setPaidAmount(BigDecimal paidAmount) { + this.paidAmount = paidAmount; + } + + public Long getPaidAt() { + return paidAt; + } + + public void setPaidAt(Long paidAt) { + this.paidAt = paidAt; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java new file mode 100644 index 0000000..32a8954 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java @@ -0,0 +1,158 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbShopTable implements Serializable { + private Integer id; + + private String name; + + private Integer shopId; + + private Integer maxCapacity; + + private Integer sort; + + private Integer areaId; + + private Byte isPredate; + + private BigDecimal predateAmount; + + private String status; + + private Byte type; + + private BigDecimal amount; + + private BigDecimal perhour; + + private String view; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public Integer getMaxCapacity() { + return maxCapacity; + } + + public void setMaxCapacity(Integer maxCapacity) { + this.maxCapacity = maxCapacity; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Integer getAreaId() { + return areaId; + } + + public void setAreaId(Integer areaId) { + this.areaId = areaId; + } + + public Byte getIsPredate() { + return isPredate; + } + + public void setIsPredate(Byte isPredate) { + this.isPredate = isPredate; + } + + public BigDecimal getPredateAmount() { + return predateAmount; + } + + public void setPredateAmount(BigDecimal predateAmount) { + this.predateAmount = predateAmount; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getPerhour() { + return perhour; + } + + public void setPerhour(BigDecimal perhour) { + this.perhour = perhour; + } + + public String getView() { + return view; + } + + public void setView(String view) { + this.view = view == null ? null : view.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUnit.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUnit.java new file mode 100644 index 0000000..2b3b263 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUnit.java @@ -0,0 +1,107 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbShopUnit implements Serializable { + private Integer id; + + private String name; + + private Integer decimalsDigits; + + private String unitType; + + private Byte isSystem; + + private Byte status; + + private String merchantId; + + private String shopId; + + private Long createdAt; + + private Long updatedAt; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Integer getDecimalsDigits() { + return decimalsDigits; + } + + public void setDecimalsDigits(Integer decimalsDigits) { + this.decimalsDigits = decimalsDigits; + } + + public String getUnitType() { + return unitType; + } + + public void setUnitType(String unitType) { + this.unitType = unitType == null ? null : unitType.trim(); + } + + public Byte getIsSystem() { + return isSystem; + } + + public void setIsSystem(Byte isSystem) { + this.isSystem = isSystem; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java new file mode 100644 index 0000000..247afea --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java @@ -0,0 +1,288 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbShopUser implements Serializable { + private Integer id; + + private BigDecimal amount; + + private BigDecimal creditAmount; + + private BigDecimal consumeAmount; + + private Integer consumeNumber; + + private BigDecimal levelConsume; + + private Byte status; + + private String merchantId; + + private String shopId; + + private String userId; + + private String parentId; + + private String parentLevel; + + private String name; + + private String headImg; + + private Byte sex; + + private String birthDay; + + private String telephone; + + private Byte isVip; + + private String code; + + private Byte isAttention; + + private Integer attentionAt; + + private Byte isShareholder; + + private Byte level; + + private String distributeType; + + private Integer sort; + + private Long createdAt; + + private Long updatedAt; + + private String miniOpenId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getCreditAmount() { + return creditAmount; + } + + public void setCreditAmount(BigDecimal creditAmount) { + this.creditAmount = creditAmount; + } + + public BigDecimal getConsumeAmount() { + return consumeAmount; + } + + public void setConsumeAmount(BigDecimal consumeAmount) { + this.consumeAmount = consumeAmount; + } + + public Integer getConsumeNumber() { + return consumeNumber; + } + + public void setConsumeNumber(Integer consumeNumber) { + this.consumeNumber = consumeNumber; + } + + public BigDecimal getLevelConsume() { + return levelConsume; + } + + public void setLevelConsume(BigDecimal levelConsume) { + this.levelConsume = levelConsume; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId == null ? null : parentId.trim(); + } + + public String getParentLevel() { + return parentLevel; + } + + public void setParentLevel(String parentLevel) { + this.parentLevel = parentLevel == null ? null : parentLevel.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getHeadImg() { + return headImg; + } + + public void setHeadImg(String headImg) { + this.headImg = headImg == null ? null : headImg.trim(); + } + + public Byte getSex() { + return sex; + } + + public void setSex(Byte sex) { + this.sex = sex; + } + + public String getBirthDay() { + return birthDay; + } + + public void setBirthDay(String birthDay) { + this.birthDay = birthDay == null ? null : birthDay.trim(); + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone == null ? null : telephone.trim(); + } + + public Byte getIsVip() { + return isVip; + } + + public void setIsVip(Byte isVip) { + this.isVip = isVip; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public Byte getIsAttention() { + return isAttention; + } + + public void setIsAttention(Byte isAttention) { + this.isAttention = isAttention; + } + + public Integer getAttentionAt() { + return attentionAt; + } + + public void setAttentionAt(Integer attentionAt) { + this.attentionAt = attentionAt; + } + + public Byte getIsShareholder() { + return isShareholder; + } + + public void setIsShareholder(Byte isShareholder) { + this.isShareholder = isShareholder; + } + + public Byte getLevel() { + return level; + } + + public void setLevel(Byte level) { + this.level = level; + } + + public String getDistributeType() { + return distributeType; + } + + public void setDistributeType(String distributeType) { + this.distributeType = distributeType == null ? null : distributeType.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getMiniOpenId() { + return miniOpenId; + } + + public void setMiniOpenId(String miniOpenId) { + this.miniOpenId = miniOpenId == null ? null : miniOpenId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java new file mode 100644 index 0000000..d70e58c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java @@ -0,0 +1,79 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class TbShopUserFlow implements Serializable { + private Integer id; + + private Integer shopUserId; + + private BigDecimal amount; + + private BigDecimal balance; + + private String bizCode; + + private String bizName; + + private Date createTime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getShopUserId() { + return shopUserId; + } + + public void setShopUserId(Integer shopUserId) { + this.shopUserId = shopUserId; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getBalance() { + return balance; + } + + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + public String getBizCode() { + return bizCode; + } + + public void setBizCode(String bizCode) { + this.bizCode = bizCode == null ? null : bizCode.trim(); + } + + public String getBizName() { + return bizName; + } + + public void setBizName(String bizName) { + this.bizName = bizName == null ? null : bizName.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbToken.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbToken.java new file mode 100644 index 0000000..7f83a06 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbToken.java @@ -0,0 +1,108 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class TbToken implements Serializable { + private Integer id; + + private Integer accountId; + + private Integer staffId; + + private String clientType; + + private String token; + + private String ip; + + private String status; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getAccountId() { + return accountId; + } + + public void setAccountId(Integer accountId) { + this.accountId = accountId; + } + + public Integer getStaffId() { + return staffId; + } + + public void setStaffId(Integer staffId) { + this.staffId = staffId; + } + + public String getClientType() { + return clientType; + } + + public void setClientType(String clientType) { + this.clientType = clientType == null ? null : clientType.trim(); + } + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token == null ? null : token.trim(); + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip == null ? null : ip.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; + } + + public TbToken(Integer accountId, Integer staffId, String clientType, String token, String ip, String status, Date createTime) { + this.accountId = accountId; + this.staffId = staffId; + this.clientType = clientType; + this.token = token; + this.ip = ip; + this.status = status; + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java new file mode 100644 index 0000000..341a89d --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java @@ -0,0 +1,458 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class TbUserInfo implements Serializable { + private Integer id; + + private BigDecimal amount; + + private BigDecimal chargeAmount; + + private BigDecimal lineOfCredit; + + private BigDecimal consumeAmount; + + private Integer consumeNumber; + + private Integer totalScore; + + private Integer lockScore; + + private String cardNo; + + private String cardPassword; + + private String levelId; + + private String headImg; + + private String nickName; + + private String telephone; + + private String wxMaAppId; + + private String birthDay; + + private Byte sex; + + private String miniAppOpenId; + + private String openId; + + private String unionId; + + private String code; + + private String type; + + private Byte identify; + + private Byte status; + + private String parentId; + + private String parentLevel; + + private String parentType; + + private String projectId; + + private String merchantId; + + private Byte isResource; + + private Byte isOnline; + + private Byte isVip; + + private Integer vipEffectAt; + + private String tips; + + private String sourcePath; + + private Byte isSalesPerson; + + private Byte isAttentionMp; + + private String city; + + private String searchWord; + + private Long lastLogInAt; + + private Long lastLeaveAt; + + private Long createdAt; + + private Long updatedAt; + + private Long bindParentAt; + + private String grandParentId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getChargeAmount() { + return chargeAmount; + } + + public void setChargeAmount(BigDecimal chargeAmount) { + this.chargeAmount = chargeAmount; + } + + public BigDecimal getLineOfCredit() { + return lineOfCredit; + } + + public void setLineOfCredit(BigDecimal lineOfCredit) { + this.lineOfCredit = lineOfCredit; + } + + public BigDecimal getConsumeAmount() { + return consumeAmount; + } + + public void setConsumeAmount(BigDecimal consumeAmount) { + this.consumeAmount = consumeAmount; + } + + public Integer getConsumeNumber() { + return consumeNumber; + } + + public void setConsumeNumber(Integer consumeNumber) { + this.consumeNumber = consumeNumber; + } + + public Integer getTotalScore() { + return totalScore; + } + + public void setTotalScore(Integer totalScore) { + this.totalScore = totalScore; + } + + public Integer getLockScore() { + return lockScore; + } + + public void setLockScore(Integer lockScore) { + this.lockScore = lockScore; + } + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo == null ? null : cardNo.trim(); + } + + public String getCardPassword() { + return cardPassword; + } + + public void setCardPassword(String cardPassword) { + this.cardPassword = cardPassword == null ? null : cardPassword.trim(); + } + + public String getLevelId() { + return levelId; + } + + public void setLevelId(String levelId) { + this.levelId = levelId == null ? null : levelId.trim(); + } + + public String getHeadImg() { + return headImg; + } + + public void setHeadImg(String headImg) { + this.headImg = headImg == null ? null : headImg.trim(); + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName == null ? null : nickName.trim(); + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone == null ? null : telephone.trim(); + } + + public String getWxMaAppId() { + return wxMaAppId; + } + + public void setWxMaAppId(String wxMaAppId) { + this.wxMaAppId = wxMaAppId == null ? null : wxMaAppId.trim(); + } + + public String getBirthDay() { + return birthDay; + } + + public void setBirthDay(String birthDay) { + this.birthDay = birthDay == null ? null : birthDay.trim(); + } + + public Byte getSex() { + return sex; + } + + public void setSex(Byte sex) { + this.sex = sex; + } + + public String getMiniAppOpenId() { + return miniAppOpenId; + } + + public void setMiniAppOpenId(String miniAppOpenId) { + this.miniAppOpenId = miniAppOpenId == null ? null : miniAppOpenId.trim(); + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId == null ? null : openId.trim(); + } + + public String getUnionId() { + return unionId; + } + + public void setUnionId(String unionId) { + this.unionId = unionId == null ? null : unionId.trim(); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public Byte getIdentify() { + return identify; + } + + public void setIdentify(Byte identify) { + this.identify = identify; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId == null ? null : parentId.trim(); + } + + public String getParentLevel() { + return parentLevel; + } + + public void setParentLevel(String parentLevel) { + this.parentLevel = parentLevel == null ? null : parentLevel.trim(); + } + + public String getParentType() { + return parentType; + } + + public void setParentType(String parentType) { + this.parentType = parentType == null ? null : parentType.trim(); + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId == null ? null : projectId.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public Byte getIsResource() { + return isResource; + } + + public void setIsResource(Byte isResource) { + this.isResource = isResource; + } + + public Byte getIsOnline() { + return isOnline; + } + + public void setIsOnline(Byte isOnline) { + this.isOnline = isOnline; + } + + public Byte getIsVip() { + return isVip; + } + + public void setIsVip(Byte isVip) { + this.isVip = isVip; + } + + public Integer getVipEffectAt() { + return vipEffectAt; + } + + public void setVipEffectAt(Integer vipEffectAt) { + this.vipEffectAt = vipEffectAt; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips == null ? null : tips.trim(); + } + + public String getSourcePath() { + return sourcePath; + } + + public void setSourcePath(String sourcePath) { + this.sourcePath = sourcePath == null ? null : sourcePath.trim(); + } + + public Byte getIsSalesPerson() { + return isSalesPerson; + } + + public void setIsSalesPerson(Byte isSalesPerson) { + this.isSalesPerson = isSalesPerson; + } + + public Byte getIsAttentionMp() { + return isAttentionMp; + } + + public void setIsAttentionMp(Byte isAttentionMp) { + this.isAttentionMp = isAttentionMp; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city == null ? null : city.trim(); + } + + public String getSearchWord() { + return searchWord; + } + + public void setSearchWord(String searchWord) { + this.searchWord = searchWord == null ? null : searchWord.trim(); + } + + public Long getLastLogInAt() { + return lastLogInAt; + } + + public void setLastLogInAt(Long lastLogInAt) { + this.lastLogInAt = lastLogInAt; + } + + public Long getLastLeaveAt() { + return lastLeaveAt; + } + + public void setLastLeaveAt(Long lastLeaveAt) { + this.lastLeaveAt = lastLeaveAt; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getBindParentAt() { + return bindParentAt; + } + + public void setBindParentAt(Long bindParentAt) { + this.bindParentAt = bindParentAt; + } + + public String getGrandParentId() { + return grandParentId; + } + + public void setGrandParentId(String grandParentId) { + this.grandParentId = grandParentId == null ? null : grandParentId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbmerchantAccount.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbmerchantAccount.java new file mode 100644 index 0000000..77e7ecd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbmerchantAccount.java @@ -0,0 +1,217 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class TbmerchantAccount implements Serializable { + private Integer id; + + private String account; + + private String password; + + private String merchantId; + + private String shopId; + + private String shopSnap; + + private Byte isAdmin; + + private Byte isMercantile; + + private String name; + + private Byte sex; + + private String email; + + private String telephone; + + private Boolean status; + + private Integer sort; + + private Integer roleId; + + private Integer lastLoginAt; + + private String mpOpenId; + + private Byte msgAble; + + private Long createdAt; + + private Long updatedAt; + + private String headImg; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account == null ? null : account.trim(); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password == null ? null : password.trim(); + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId == null ? null : merchantId.trim(); + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId == null ? null : shopId.trim(); + } + + public String getShopSnap() { + return shopSnap; + } + + public void setShopSnap(String shopSnap) { + this.shopSnap = shopSnap == null ? null : shopSnap.trim(); + } + + public Byte getIsAdmin() { + return isAdmin; + } + + public void setIsAdmin(Byte isAdmin) { + this.isAdmin = isAdmin; + } + + public Byte getIsMercantile() { + return isMercantile; + } + + public void setIsMercantile(Byte isMercantile) { + this.isMercantile = isMercantile; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getSex() { + return sex; + } + + public void setSex(Byte sex) { + this.sex = sex; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email == null ? null : email.trim(); + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone == null ? null : telephone.trim(); + } + + public Boolean getStatus() { + return status; + } + + public void setStatus(Boolean status) { + this.status = status; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } + + public Integer getLastLoginAt() { + return lastLoginAt; + } + + public void setLastLoginAt(Integer lastLoginAt) { + this.lastLoginAt = lastLoginAt; + } + + public String getMpOpenId() { + return mpOpenId; + } + + public void setMpOpenId(String mpOpenId) { + this.mpOpenId = mpOpenId == null ? null : mpOpenId.trim(); + } + + public Byte getMsgAble() { + return msgAble; + } + + public void setMsgAble(Byte msgAble) { + this.msgAble = msgAble; + } + + public Long getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public String getHeadImg() { + return headImg; + } + + public void setHeadImg(String headImg) { + this.headImg = headImg == null ? null : headImg.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfig.java new file mode 100644 index 0000000..79615f3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfig.java @@ -0,0 +1,97 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class ToolAlipayConfig implements Serializable { + private Long configId; + + private String appId; + + private String charset; + + private String format; + + private String gatewayUrl; + + private String notifyUrl; + + private String returnUrl; + + private String signType; + + private String sysServiceProviderId; + + private static final long serialVersionUID = 1L; + + public Long getConfigId() { + return configId; + } + + public void setConfigId(Long configId) { + this.configId = configId; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId == null ? null : appId.trim(); + } + + public String getCharset() { + return charset; + } + + public void setCharset(String charset) { + this.charset = charset == null ? null : charset.trim(); + } + + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format == null ? null : format.trim(); + } + + public String getGatewayUrl() { + return gatewayUrl; + } + + public void setGatewayUrl(String gatewayUrl) { + this.gatewayUrl = gatewayUrl == null ? null : gatewayUrl.trim(); + } + + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl == null ? null : notifyUrl.trim(); + } + + public String getReturnUrl() { + return returnUrl; + } + + public void setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl == null ? null : returnUrl.trim(); + } + + public String getSignType() { + return signType; + } + + public void setSignType(String signType) { + this.signType = signType == null ? null : signType.trim(); + } + + public String getSysServiceProviderId() { + return sysServiceProviderId; + } + + public void setSysServiceProviderId(String sysServiceProviderId) { + this.sysServiceProviderId = sysServiceProviderId == null ? null : sysServiceProviderId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfigWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfigWithBLOBs.java new file mode 100644 index 0000000..acd2baa --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolAlipayConfigWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class ToolAlipayConfigWithBLOBs extends ToolAlipayConfig implements Serializable { + private String privateKey; + + private String publicKey; + + private static final long serialVersionUID = 1L; + + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + this.privateKey = privateKey == null ? null : privateKey.trim(); + } + + public String getPublicKey() { + return publicKey; + } + + public void setPublicKey(String publicKey) { + this.publicKey = publicKey == null ? null : publicKey.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolEmailConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolEmailConfig.java new file mode 100644 index 0000000..b97b766 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolEmailConfig.java @@ -0,0 +1,67 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class ToolEmailConfig implements Serializable { + private Long configId; + + private String fromUser; + + private String host; + + private String pass; + + private String port; + + private String user; + + private static final long serialVersionUID = 1L; + + public Long getConfigId() { + return configId; + } + + public void setConfigId(Long configId) { + this.configId = configId; + } + + public String getFromUser() { + return fromUser; + } + + public void setFromUser(String fromUser) { + this.fromUser = fromUser == null ? null : fromUser.trim(); + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host == null ? null : host.trim(); + } + + public String getPass() { + return pass; + } + + public void setPass(String pass) { + this.pass = pass == null ? null : pass.trim(); + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port == null ? null : port.trim(); + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user == null ? null : user.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolLocalStorage.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolLocalStorage.java new file mode 100644 index 0000000..7b47ea4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolLocalStorage.java @@ -0,0 +1,118 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class ToolLocalStorage implements Serializable { + private Long storageId; + + private String realName; + + private String name; + + private String suffix; + + private String path; + + private String type; + + private String size; + + private String createBy; + + private String updateBy; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getStorageId() { + return storageId; + } + + public void setStorageId(Long storageId) { + this.storageId = storageId; + } + + public String getRealName() { + return realName; + } + + public void setRealName(String realName) { + this.realName = realName == null ? null : realName.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix == null ? null : suffix.trim(); + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path == null ? null : path.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size == null ? null : size.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.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; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfig.java new file mode 100644 index 0000000..17f1bbd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfig.java @@ -0,0 +1,57 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class ToolQiniuConfig implements Serializable { + private Long configId; + + private String bucket; + + private String host; + + private String type; + + private String zone; + + private static final long serialVersionUID = 1L; + + public Long getConfigId() { + return configId; + } + + public void setConfigId(Long configId) { + this.configId = configId; + } + + public String getBucket() { + return bucket; + } + + public void setBucket(String bucket) { + this.bucket = bucket == null ? null : bucket.trim(); + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host == null ? null : host.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone == null ? null : zone.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfigWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfigWithBLOBs.java new file mode 100644 index 0000000..82dc353 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuConfigWithBLOBs.java @@ -0,0 +1,27 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; + +public class ToolQiniuConfigWithBLOBs extends ToolQiniuConfig implements Serializable { + private String accessKey; + + private String secretKey; + + private static final long serialVersionUID = 1L; + + public String getAccessKey() { + return accessKey; + } + + public void setAccessKey(String accessKey) { + this.accessKey = accessKey == null ? null : accessKey.trim(); + } + + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey == null ? null : secretKey.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuContent.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuContent.java new file mode 100644 index 0000000..4872bcd --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ToolQiniuContent.java @@ -0,0 +1,88 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.util.Date; + +public class ToolQiniuContent implements Serializable { + private Long contentId; + + private String bucket; + + private String name; + + private String size; + + private String type; + + private String url; + + private String suffix; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getContentId() { + return contentId; + } + + public void setContentId(Long contentId) { + this.contentId = contentId; + } + + public String getBucket() { + return bucket; + } + + public void setBucket(String bucket) { + this.bucket = bucket == null ? null : bucket.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size == null ? null : size.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url == null ? null : url.trim(); + } + + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix == null ? null : suffix.trim(); + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/CartPo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/CartPo.java new file mode 100644 index 0000000..407e038 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/CartPo.java @@ -0,0 +1,15 @@ +package com.chaozhanggui.system.cashierservice.entity.po; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class CartPo { + private String masterId; + private String productName; + private String uuid; + private Integer shopId; + private Long pendingAt; + private BigDecimal totalAmount; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderDetailPo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderDetailPo.java new file mode 100644 index 0000000..140a211 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderDetailPo.java @@ -0,0 +1,16 @@ +package com.chaozhanggui.system.cashierservice.entity.po; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class OrderDetailPo { + private Integer id; + private long createdAt; + private String orderNo; + private String productName; + private String status; + private Integer productNum; + private BigDecimal orderAmount; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderPo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderPo.java new file mode 100644 index 0000000..b2e3805 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/OrderPo.java @@ -0,0 +1,25 @@ +package com.chaozhanggui.system.cashierservice.entity.po; + +import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class OrderPo { + private Integer id; + private String orderNo; + private String masterId; + private Long createAt; + private String userId; + private String status; + private String productName; + private String imgUrl; + private String orderType; + private String zdNo; + private String[] names; + private Integer productNum; + private BigDecimal orderAmount; + private TbOrderDetail orderDetail; + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/QueryCartPo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/QueryCartPo.java new file mode 100644 index 0000000..f5bf0ec --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/po/QueryCartPo.java @@ -0,0 +1,13 @@ +package com.chaozhanggui.system.cashierservice.entity.po; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class QueryCartPo { + private Integer productNum; + private Integer productSum; + private BigDecimal totalAmount; + private BigDecimal packAmount; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CartVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CartVo.java new file mode 100644 index 0000000..119851f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CartVo.java @@ -0,0 +1,18 @@ +package com.chaozhanggui.system.cashierservice.entity.vo; + +import lombok.Data; + +@Data +public class CartVo { + private String productId; + private String masterId; + private String shopId; + private Integer skuId; + private Integer number; + private String isPack; + private String isGift; + private String status; + private String uuid; + private String type; + private Integer cartId; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/exception/MsgException.java b/src/main/java/com/chaozhanggui/system/cashierservice/exception/MsgException.java new file mode 100644 index 0000000..b2c23a2 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/exception/MsgException.java @@ -0,0 +1,102 @@ +package com.chaozhanggui.system.cashierservice.exception; + +import com.chaozhanggui.system.cashierservice.annotation.ResultCode; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; +import org.apache.commons.lang3.StringUtils; + +import java.io.Serializable; +import java.util.List; + +/** + * 一般异常信息的异常,全局捕获会抛出异常信息给前端 + * @author Djh + */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class MsgException extends RuntimeException { + + private final Serializable obj; + private final ResultCode code; + + public MsgException(String msg) { + this(msg, null); + } + + public MsgException(String msg, Serializable obj) { + this(ResultCode.FAIL, msg, obj); + } + + public MsgException(ResultCode code, String msg, Serializable obj) { + super(msg); + this.code = code; + this.obj = obj; + } + + public static void throwException(String msg) throws MsgException { + throw new MsgException(msg); + } + + /** + * @param result + * @param errMsg + * + * @throws MsgException 为空的时候抛出异常 + */ + public static void check(boolean result, String errMsg) throws MsgException { + if (result) { + throw new MsgException(errMsg); + } + } + + /** + * @param obj1 + * @param errMsg + */ + public static void checkNull(Object obj1, String errMsg) throws MsgException { + if (obj1 == null) { + throw new MsgException(errMsg); + } + } + + public static void checkEquals(Object obj1, Object obj2, String errMsg) { + if (obj1.equals(obj2)) { + throw new MsgException(errMsg); + } + } + + public static void checkUnequals(Object obj1, Object obj2, String errMsg) { + if (!obj1.equals(obj2)) { + throw new MsgException(errMsg); + } + } + + public static void checkNonNull(Object obj1, String errMsg) throws MsgException { + if (obj1 != null) { + throw new MsgException(errMsg); + } + } + + public static void checkBlank(String field, String errMsg) throws MsgException { + if (StringUtils.isBlank(field)) { + throw new MsgException(errMsg); + } + } + + public static void checkBlank(List dataList, String errMsg) throws MsgException { + if (dataList == null || dataList.isEmpty()) { + throw new MsgException(errMsg); + } + } + + public static void checkNonBlank(List dataList, String errMsg) throws MsgException { + if (dataList != null && !dataList.isEmpty()) { + throw new MsgException(errMsg); + } + } +} + diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java new file mode 100644 index 0000000..0cdd811 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java @@ -0,0 +1,39 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import javax.servlet.*; +import javax.servlet.annotation.WebFilter; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; + +@Slf4j +@Component +@WebFilter(urlPatterns = {"/order-service/order/*"},filterName = "customFilter") +public class CustomFilter implements Filter { + @Override + public void init(FilterConfig filterConfig) throws ServletException { + log.info(">>>> customFilter init <<<<"); + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + log.info(">>>> customFilter doFilter start <<<<"); + RequestWrapper requestWapper = null; + if (servletRequest instanceof HttpServletRequest) { + requestWapper = new RequestWrapper((HttpServletRequest) servletRequest); + } + + if (requestWapper != null) { + filterChain.doFilter(requestWapper,servletResponse); + } else { + filterChain.doFilter(servletRequest,servletResponse); + } + } + + @Override + public void destroy() { + log.info(">>>> customFilter destroy <<<<"); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomGenerator.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomGenerator.java new file mode 100644 index 0000000..26eb1af --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomGenerator.java @@ -0,0 +1,12 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.BeanNameGenerator; + +public class CustomGenerator implements BeanNameGenerator { + @Override + public String generateBeanName(BeanDefinition beanDefinition, BeanDefinitionRegistry beanDefinitionRegistry) { + return beanDefinition.getBeanClassName(); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/GlobalCorsConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/GlobalCorsConfig.java new file mode 100644 index 0000000..687d303 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/GlobalCorsConfig.java @@ -0,0 +1,30 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.reactive.CorsWebFilter; +import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource; + +@Configuration +public class GlobalCorsConfig { + @Bean + public CorsWebFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + // 配置跨域 + CorsConfiguration corsConfiguration = new CorsConfiguration(); + // 允许哪个请求头 + corsConfiguration.addAllowedHeader("*"); + // 允许哪个方法进行跨域 + corsConfiguration.addAllowedMethod("*"); + // 允许哪个请求来源进行跨域 + // corsConfiguration.addAllowedOrigin("*"); + corsConfiguration.addAllowedOriginPattern("*"); + // 是否允许携带cookie进行跨域 + corsConfiguration.setAllowCredentials(true); + + source.registerCorsConfiguration("/**",corsConfiguration); + return new CorsWebFilter(source); + } +} + diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/RequestWrapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/RequestWrapper.java new file mode 100644 index 0000000..4f21c5d --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/RequestWrapper.java @@ -0,0 +1,84 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import javax.servlet.ReadListener; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; +import java.io.*; + +public class RequestWrapper extends HttpServletRequestWrapper { + private final String body; + + public RequestWrapper(HttpServletRequest request) { + super(request); + StringBuilder stringBuilder = new StringBuilder(); + BufferedReader bufferedReader = null; + InputStream inputStream = null; + try { + inputStream = request.getInputStream(); + if (inputStream != null) { + bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); + char[] charBuffer = new char[128]; + int bytesRead = -1; + while ((bytesRead = bufferedReader.read(charBuffer)) > 0) { + stringBuilder.append(charBuffer, 0, bytesRead); + } + } else { + stringBuilder.append(""); + } + } catch (IOException ex) { + ex.printStackTrace(); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + if (bufferedReader != null) { + try { + bufferedReader.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + } + body = stringBuilder.toString(); + } + + @Override + public ServletInputStream getInputStream() throws IOException { + final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(body.getBytes()); + ServletInputStream servletInputStream = new ServletInputStream() { + @Override + public boolean isFinished() { + return false; + } + @Override + public boolean isReady() { + return false; + } + @Override + public void setReadListener(ReadListener readListener) { + } + @Override + public int read() throws IOException { + return byteArrayInputStream.read(); + } + }; + return servletInputStream; + + } + + @Override + public BufferedReader getReader() throws IOException { + return new BufferedReader(new InputStreamReader(this.getInputStream())); + } + + public String getBody() { + return this.body; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/SignInterceptor.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/SignInterceptor.java new file mode 100644 index 0000000..fe0ce7c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/SignInterceptor.java @@ -0,0 +1,119 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.sign.SignEnum; +import com.chaozhanggui.system.cashierservice.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpMethod; +import org.springframework.stereotype.Component; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Component +public class SignInterceptor implements HandlerInterceptor { + private final static Logger log = LoggerFactory.getLogger(SignInterceptor.class); + + private static final String CONTENT_TYPE = "text/json;charset=UTF-8"; + + + @Autowired + RedisUtil redisUtil; + + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + + + + String requestURI = request.getRequestURI(); + + if (HttpMethod.OPTIONS.toString().equals(request.getMethod())) { + response.setStatus(HttpServletResponse.SC_OK); + // 放行OPTIONS请求 + return true; + } + + String token=request.getHeader("token"); + String loginName=request.getHeader("loginName"); + String clientType=request.getHeader("clientType"); + if(ObjectUtil.isEmpty(loginName)||ObjectUtil.isEmpty(clientType)||ObjectUtil.isEmpty(token)){ + response.setContentType(CONTENT_TYPE); + response.getWriter().print(JSONUtil.toJsonStr(new Result(CodeEnum.TOENNOEXIST))); + return false; + } + + + String key=RedisCst.ONLINE_USER.concat(":").concat(clientType).concat(":").concat(loginName); + + String cacheToken= redisUtil.getMessage(key); + if(ObjectUtil.isEmpty(cacheToken)||!cacheToken.equals(token)){ + response.setContentType(CONTENT_TYPE); + response.getWriter().print(JSONUtil.toJsonStr(new Result(CodeEnum.TOENNOEXIST))); + return false; + } + + return true; + } + + private boolean signCheck(Object map, SignEnum enumm, String privateKey, String publicKey) throws Exception { + if (enumm == SignEnum.MD5) { + return MD5Util.check(map, privateKey); + } else if (enumm == SignEnum.SHA1) { + return SHA1Util.check(map); + } else if (enumm == SignEnum.RSA) { + Map data=(HashMap)map; + String sign=data.get("sign").toString(); + return RSAUtils.verify(JSONUtil.toJsonStr(data.get("data")),RSAUtils.getPublicKey(publicKey),sign); + } + return false; + } + + + public Map getMap(Object obj){ + Map map=new HashMap(); + if(obj==null){ + return null; + } + + if(obj instanceof Map){ + map=(Map) obj; + }else{ + map = BeanUtil.transBean2Map(obj); + } + + if(map.containsKey("sign")){ + map.remove("sign"); + } + return map; + + } + + /** + * 把request转为map + * @param request + * @return + */ + private Map getParameterMap(HttpServletRequest request) { + RequestWrapper requestWrapper = new RequestWrapper(request); + String body = requestWrapper.getBody(); + if (ObjectUtil.isNotEmpty(body)) { + return JSONUtil.toBean(body, Map.class); + } + return null; + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/WebAppConfigurer.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/WebAppConfigurer.java new file mode 100644 index 0000000..341edc6 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/WebAppConfigurer.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.interceptor; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + + +@Configuration +public class WebAppConfigurer implements WebMvcConfigurer { + + @Autowired + SignInterceptor signInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(signInterceptor) + .addPathPatterns("/**") + .excludePathPatterns("/login/login") + .excludePathPatterns("/cloudPrinter/print"); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseReq.java new file mode 100644 index 0000000..ac63a80 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseReq.java @@ -0,0 +1,12 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +@Data +public class BaseReq { + + private String serialNumber; + + // pc web ios Android + private String clientType; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseRequest.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseRequest.java new file mode 100644 index 0000000..0088f33 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/BaseRequest.java @@ -0,0 +1,16 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class BaseRequest implements Serializable { + + private String appId; + + private String sign; + + private Long timestamp; + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/CategoryInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/CategoryInfo.java new file mode 100644 index 0000000..ce7639d --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/CategoryInfo.java @@ -0,0 +1,23 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +@Data +public class CategoryInfo { + + private Integer id; + private String name; + private String shortName; + private String tree; + private String pid; + private String pic; + private String merchantId; + private String shopId; + private String style; + private String isShow; + private String detail; + private String sort; + private String keyWord; + private String createdAt; + private String updatedAt; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/HandoverInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/HandoverInfo.java new file mode 100644 index 0000000..985c364 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/HandoverInfo.java @@ -0,0 +1,72 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class HandoverInfo implements Serializable { + + private String merchantName; + + private String startTime; + + private String endTime; + + private String staff; + + + private List payInfos; + + private List memberData; + + private String totalAmount; + + + private String imprest; + + private String payable; + + private String handIn; + + private String orderNum; + + public HandoverInfo(String merchantName, String startTime, String endTime, String staff, List payInfos, List memberData, String totalAmount, String imprest, String payable, String handIn, String orderNum) { + this.merchantName = merchantName; + this.startTime = startTime; + this.endTime = endTime; + this.staff = staff; + this.payInfos = payInfos; + this.memberData = memberData; + this.totalAmount = totalAmount; + this.imprest = imprest; + this.payable = payable; + this.handIn = handIn; + this.orderNum = orderNum; + } + + @Data + public static class PayInfo{ + private String payType; + + private String amount; + + public PayInfo(String payType, String amount) { + this.payType = payType; + this.amount = amount; + } + } + + @Data + public static class MemberData{ + private String amount; + + private String deposit; + + public MemberData(String amount, String deposit) { + this.amount = amount; + this.deposit = deposit; + } + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/LoginReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/LoginReq.java new file mode 100644 index 0000000..8122d9b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/LoginReq.java @@ -0,0 +1,14 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +@Data +public class LoginReq extends BaseReq { + + + private String merchantName; + + private String loginName; + + private String password; +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/OrderDetailPO.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/OrderDetailPO.java new file mode 100644 index 0000000..461f7a9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/OrderDetailPO.java @@ -0,0 +1,70 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class OrderDetailPO implements Serializable { + + private String merchantName; + + private String printType; + + private String masterId; + + private String orderNo; + + private String tradeDate; + + private String operator; + + private String receiptsAmount; + + private String balance; + + private String payType; + + private String integral; + + List detailList; + + + private String remark; + + + @Data + public static class Detail implements Serializable{ + private String productName; + + private String number; + + private String amount; + + private String spec; + + public Detail(String productName, String number, String amount, String spec) { + this.productName = productName; + this.number = number; + this.amount = amount; + this.spec = spec; + } + } + + + public OrderDetailPO(String merchantName, String printType, String masterId, String orderNo, String tradeDate, String operator, String receiptsAmount, String balance, String payType, String integral, List detailList, String remark) { + this.merchantName = merchantName; + this.printType = printType; + this.masterId = masterId; + this.orderNo = orderNo; + this.tradeDate = tradeDate; + this.operator = operator; + this.receiptsAmount = receiptsAmount; + this.balance = balance; + this.payType = payType; + this.integral = integral; + this.detailList = detailList; + this.remark = remark; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/PayReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/PayReq.java new file mode 100644 index 0000000..99973d2 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/PayReq.java @@ -0,0 +1,51 @@ +package com.chaozhanggui.system.cashierservice.model; + +import cn.hutool.json.JSONUtil; +import com.chaozhanggui.system.cashierservice.util.BeanUtil; +import com.chaozhanggui.system.cashierservice.util.MD5Util; +import lombok.Data; + +import java.util.Map; + +@Data +public class PayReq extends BaseRequest{ + + private String ip; + private String mercOrderNo; + + private String notifyUrl; + + private String payAmt; + + private String payType; + + private String payWay; + + private String subject; + + private String userId; + + + public static void main(String[] args){ + PayReq req=new PayReq(); + String privateKey="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIqNqTqhN8zE7eFZnwKcyBTENce2wdAtl/gaDHNuNVgg33dS27Jx0fKl9QSHXyzyxbAdG8F94niYbRBstrMymFRjuO72jH+rIH62Ym1k7l8JSLVK2dKHXt8lHDaQGUP10q0EEocnDQ9cL93oBNG1ttsV6vOAu1TPvRK9TGihRAe1AgMBAAECgYBmI8KCl0DkcrSOsRvYuC2DqZWf8el1B3eFjeZp3e/zVOCIPYv6Q5ArWg6DVSxjnWEA0KSagqvGjU+xkQMqnXzPcPMhsIS+1wyR/pP+pwiatO2ioHaQpEqHg9eXhxrgA477/xuKVw9zl5GNqaIgd++2NDXnqLh0Y6OR73f0OB5eDQJBAPihEm+UWLOam/Q/k2+k4Lm2dvxJTBur1fslBiJpgMhgcz/PlwRwpL7aPD0AuPv0NqLouuoTiKpq9icnUv12tgsCQQCOqTANw0IErCHUNdinjXewmG3ui1j9XgM41rSn5ZeTrPL4GhZc2zbS/pZT4PBKUL6NLGkfPHmw4rOmNL/Xc5E/AkBqAwQBX5eSvVHSC2mqKPtJNGv3lqlFAzfyJg8/jQzEY5vAkZsq4Xzdg+A7gptdkvvY6rMIK9wSDhl3CGVyfbORAkA1N+g1OiHmnFACWhP4bU25EyPvWQxZeDi7e1zpRTzGWj5JT3IIMb7B9zcdE0yQbI6pG2gbvvOmiOt7lTH7raEBAkBas2gugvR3f0aGqQcqMpyM627pyRppQ2h58/7KBylP3oR2BReqMUcXeiJ8TuBXzbRXpeVQ0DWOva5CWZJmBMdz"; + + req.setAppId("M800202305094c170c"); + req.setTimestamp(1693966210242l); + req.setIp("47.97.26.47"); + req.setMercOrderNo("bb243a4731234f19af7734350fad19a4"); + req.setNotifyUrl("https://cashier.machine.sxczgkj.cn/web-custom/custom/third/ysk/wx-pay-notify/bb243a4731234f19af7734350fad19a4"); + req.setPayAmt("20.00"); + req.setPayType("03"); + req.setPayWay("WXZF"); + req.setSubject("描述"); + req.setUserId("o5Fun5XQAaAhf00hB9qBNnel9vYQ"); + + Map map= BeanUtil.transBean2Map(req); + + req.setSign(MD5Util.encrypt(map,privateKey)); + System.out.println(JSONUtil.toJsonStr(req)); + } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnOrderReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnOrderReq.java new file mode 100644 index 0000000..fa49f85 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnOrderReq.java @@ -0,0 +1,38 @@ +package com.chaozhanggui.system.cashierservice.model; + +import cn.hutool.json.JSONUtil; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Map; + +@Data +public class ReturnOrderReq extends BaseRequest { + + private String orderNumber; + + private String amount; + + private String mercRefundNo; + + private String refundReason; + + private String payPassword; + + public static void main(String[] args){ + String privateKey="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIqNqTqhN8zE7eFZnwKcyBTENce2wdAtl/gaDHNuNVgg33dS27Jx0fKl9QSHXyzyxbAdG8F94niYbRBstrMymFRjuO72jH+rIH62Ym1k7l8JSLVK2dKHXt8lHDaQGUP10q0EEocnDQ9cL93oBNG1ttsV6vOAu1TPvRK9TGihRAe1AgMBAAECgYBmI8KCl0DkcrSOsRvYuC2DqZWf8el1B3eFjeZp3e/zVOCIPYv6Q5ArWg6DVSxjnWEA0KSagqvGjU+xkQMqnXzPcPMhsIS+1wyR/pP+pwiatO2ioHaQpEqHg9eXhxrgA477/xuKVw9zl5GNqaIgd++2NDXnqLh0Y6OR73f0OB5eDQJBAPihEm+UWLOam/Q/k2+k4Lm2dvxJTBur1fslBiJpgMhgcz/PlwRwpL7aPD0AuPv0NqLouuoTiKpq9icnUv12tgsCQQCOqTANw0IErCHUNdinjXewmG3ui1j9XgM41rSn5ZeTrPL4GhZc2zbS/pZT4PBKUL6NLGkfPHmw4rOmNL/Xc5E/AkBqAwQBX5eSvVHSC2mqKPtJNGv3lqlFAzfyJg8/jQzEY5vAkZsq4Xzdg+A7gptdkvvY6rMIK9wSDhl3CGVyfbORAkA1N+g1OiHmnFACWhP4bU25EyPvWQxZeDi7e1zpRTzGWj5JT3IIMb7B9zcdE0yQbI6pG2gbvvOmiOt7lTH7raEBAkBas2gugvR3f0aGqQcqMpyM627pyRppQ2h58/7KBylP3oR2BReqMUcXeiJ8TuBXzbRXpeVQ0DWOva5CWZJmBMdz"; + ReturnOrderReq req=new ReturnOrderReq(); + + req.setAppId("M80020230628f696d8"); + req.setTimestamp(System.currentTimeMillis()); + req.setOrderNumber("LKL_Z_20230821112218039"); + req.setMercRefundNo("7896541236"); + req.setRefundReason("测试退款"); + req.setPayPassword("123456"); + +// Map map= BeanUtils.transBean2Map(req); +// req.setSign(MD5Util.encrypt(map,privateKey,true)); + + System.out.println(JSONUtil.toJsonStr(req)); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnWTZInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnWTZInfo.java new file mode 100644 index 0000000..ff815a5 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/ReturnWTZInfo.java @@ -0,0 +1,57 @@ +package com.chaozhanggui.system.cashierservice.model; + +import com.alibaba.fastjson.JSONObject; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +@Data +public class ReturnWTZInfo implements Serializable { + + private String orderId; + + private BigDecimal payAmount; + + private List returnDetails; + + + public ReturnWTZInfo(String orderId, BigDecimal payAmount, List returnDetails) { + this.orderId = orderId; + this.payAmount = payAmount; + this.returnDetails = returnDetails; + } + + @Data + public static class ReturnDetail{ + private String id; + + private String cetyId; + + private String number; + + public ReturnDetail(String id, String cetyId, String number) { + this.id = id; + this.cetyId = cetyId; + this.number = number; + } + } + + + public static void main(String[] args){ + List details=new ArrayList<>(); + + details.add(new ReturnDetail("1","2","5")); + details.add(new ReturnDetail("2","3","9")); + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token","黑龙江省王大秃子屯"); + jsonObject.put("type","return"); + jsonObject.put("data",new ReturnWTZInfo(01+"",new BigDecimal(3.6).setScale(2,BigDecimal.ROUND_DOWN),details)); + + System.out.println(jsonObject.toJSONString()); + } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/ScanPayReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/ScanPayReq.java new file mode 100644 index 0000000..2d9b113 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/ScanPayReq.java @@ -0,0 +1,40 @@ +package com.chaozhanggui.system.cashierservice.model; + +import cn.hutool.json.JSONUtil; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Map; + +@Data +public class ScanPayReq extends BaseRequest{ + + private String consumeFee; + + private String authCode; + + private String notifyUrl; + + + + + public static void main(String[] args){ +// String privateKey="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALqNx7fzuGjrBFBxbLHOy3SPdVXacVShGAQbpjBP9C+64iQfMnGUUTSTU1IOCY+KTirgE1tZ9oDGYd6bXZcvoMvTheP1rjBlvPxeyolaK0w72bufEcr3TyiZwSEjDzvl0dnj1kUmZTnyImvQeLptVKTPbtdc0ak6ebBB61FuHvPFAgMBAAECgYAYWLKM7lDN2IYanYLq/asNzj8o8jZCLjf9KUKaIYUjyYcD4dJqgknKy8Ne/RgAVLN44v+Dt4z1J27UZ4BiX8PjPIb1MfLnQtNBQf+gITXy6+vRILK7K5js4c23BWHlmxpjsFQjVIN57/d3/eZHY8+wiSCi63fudIEWQcy7xY9BTQJBAPZj8AMSbD89D6iPbB9K5CoqpbWY1XOrbtPdG43FVEcz3Mx45U5Z7pfTuHACsTEkMBB5DjNQavZK5ZIc/mtvtqcCQQDB1GjzaeUVJ3nb4zudaDrB5UoJUsVgFCHZ7TdEB0dWyGg5CtW5Au4auMcHzBvozJDbTLQ8uZsKGbKQ09/TwHuzAkAMsELY9abrbsqSpKgtyF6NqVqVSoSbi1WOxZE4sNPRQuN5CDTO3yTBXt7drdXQMQvknUdU7yxC+MJvztxvTfZ7AkBEkK37hTcrL4a02QIKoYc/daul9qipXxXGcFp/bw+2TDhKDWIjCz1NKJYHVRV+WXbYjJ6paILGpOZ8wuZHkqxvAkAfX4h0XMyastZHj7BNB2rPHYcX8DjThRKNgSKPI5X8Ld0LCssuhkyjwv8qI3jO0+P0yXWqw4T8xZ+fqSmw1eS4"; +// ScanPayReq req=new ScanPayReq(); +// +// req.setAppId("M800202307127ae681"); +// req.setTimestamp(1692929677702L); +// req.setAuthCode("133423954644827557"); +// req.setNotifyUrl("https://cashier.machine.sxczgkj.cn/web-netty/netty/third-pay/third-pay-notify/ef554b58bf3a487eabe277c3f16e7200"); +// req.setConsumeFee(N.mul(new BigDecimal(0.01),BigDecimal.ONE)); +// +// Map map= BeanUtil.transBean2Map(req); +// req.setSign(MD5Util.encrypt(map,privateKey,true)); +// +// +// System.out.println(MD5Util.check(req,privateKey)); +// +// System.out.println(JSONUtil.toJsonStr(req)); + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/model/TradeQueryReq.java b/src/main/java/com/chaozhanggui/system/cashierservice/model/TradeQueryReq.java new file mode 100644 index 0000000..5224669 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/model/TradeQueryReq.java @@ -0,0 +1,11 @@ +package com.chaozhanggui.system.cashierservice.model; + +import lombok.Data; + + +@Data +public class TradeQueryReq extends BaseRequest { + + private String orderNumber; + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/DutyConsumer.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/DutyConsumer.java new file mode 100644 index 0000000..63210bb --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/DutyConsumer.java @@ -0,0 +1,273 @@ +package com.chaozhanggui.system.cashierservice.rabbit; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.exception.MsgException; +import com.chaozhanggui.system.cashierservice.util.DateUtils; +import com.chaozhanggui.system.cashierservice.util.TokenUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.rabbit.annotation.RabbitHandler; +import org.springframework.amqp.rabbit.annotation.RabbitListener; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.*; + +@Slf4j +@Component +@RabbitListener(queues = {RabbitConstants.CART_ORDER_COLLECT_QUEUE_PUT}) +@Service +public class DutyConsumer { + + @Autowired + private TbTokenMapper tbTokenMapper; + @Autowired + private TbOrderDetailMapper orderDetailMapper; + @Autowired + private TbOrderInfoMapper orderInfoMapper; + @Autowired + private ShopUserDutyDetailMapper shopUserDutyDetailMapper; + @Autowired + private ShopUserDutyMapper shopUserDutyMapper; + @Autowired + private TbShopInfoMapper shopInfoMapper; + @Autowired + private ShopUserDutyPayMapper shopUserDutyPayMapper; + @RabbitHandler + public void listener(String message) { + try { + System.out.println("数据落地开始"); + JSONObject jsonObject = JSON.parseObject(message); + String token = jsonObject.getString("token"); + String type = jsonObject.getString("type"); + TbToken tbToken = tbTokenMapper.selectByToken(token); + if (type.equals("return") || type.equals("create")) { + if (Objects.isNull(tbToken)) { + throw new MsgException("当前用户不存在"); + } + Integer tokenId = tbToken.getId(); + + Integer orderId = jsonObject.getInteger("orderId"); + JSONObject tokenJson = TokenUtil.parseParamFromToken(tbToken.getToken()); + Integer shopId = tokenJson.getInteger("shopId"); + Integer userId = tokenJson.getInteger("staffId"); + String loginName = tokenJson.getString("loginName"); + TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId); + if (Objects.isNull(orderInfo) && orderId > 0) { + throw new MsgException("订单不存在"); + } + List list = orderDetailMapper.selectAllByOrderId(orderId); + ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByTokenId(tokenId); + BigDecimal cashAmount = BigDecimal.ZERO; + if (orderInfo.getPayType().equals("cash")) { + cashAmount = orderInfo.getPayAmount(); + } + + if (type.equals("create")) { + if (Objects.isNull(shopUserDuty)) { + shopUserDuty = new ShopUserDuty(userId, tbToken.getCreateTime(), 1, orderInfo.getOrderAmount(), loginName, "0", + orderInfo.getOrderAmount(), shopId, BigDecimal.ZERO, cashAmount, BigDecimal.ZERO, ""); + shopUserDuty.setTokenId(tokenId); + shopUserDuty.setReturnAmount(BigDecimal.ZERO); + shopUserDuty.setTradeDay(DateUtils.getDay()); + shopUserDutyMapper.insert(shopUserDuty); + List detaiList = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + ShopUserDutyDetail shopUserDutyDetail = new ShopUserDutyDetail(); + shopUserDutyDetail.setDutyId(shopUserDuty.getId()); + shopUserDutyDetail.setAmount(orderDetail.getPriceAmount()); + shopUserDutyDetail.setNum(orderDetail.getNum()); + shopUserDutyDetail.setSkuId(orderDetail.getProductSkuId()); + shopUserDutyDetail.setSkuName(orderDetail.getProductSkuName()); + shopUserDutyDetail.setProductId(orderDetail.getProductId()); + shopUserDutyDetail.setProductName(orderDetail.getProductName()); + detaiList.add(shopUserDutyDetail); + } + if (detaiList.size() > 0) { + shopUserDutyDetailMapper.batchInsert(detaiList); + } + } else { + shopUserDuty.setAmount(shopUserDuty.getAmount().add(orderInfo.getPayAmount())); + shopUserDuty.setCashAmount(shopUserDuty.getCashAmount().add(cashAmount)); + shopUserDuty.setIncomeAmount(shopUserDuty.getIncomeAmount().add(orderInfo.getPayAmount())); + shopUserDuty.setOrderNum(shopUserDuty.getOrderNum() + 1); + shopUserDutyMapper.updateByPrimaryKeySelective(shopUserDuty); + List skuIds = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + skuIds.add(orderDetail.getProductSkuId()); + } + List details = shopUserDutyDetailMapper.selectByDuctId(shopUserDuty.getId(), skuIds); + + Map map = new HashMap<>(); + for (ShopUserDutyDetail shopUserDutyDetail : details) { + map.put(shopUserDutyDetail.getSkuId(), shopUserDutyDetail); + } + List detaiList = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + if (map.containsKey(orderDetail.getProductSkuId())) { + ShopUserDutyDetail shopUserDutyDetail = map.get(orderDetail.getProductSkuId()); + shopUserDutyDetail.setNum(shopUserDutyDetail.getNum() + orderDetail.getNum()); + shopUserDutyDetail.setAmount(shopUserDutyDetail.getAmount().add(orderDetail.getPriceAmount().add(orderDetail.getPackAmount()))); + shopUserDutyDetailMapper.updateByPrimaryKeySelective(shopUserDutyDetail); + } else { + ShopUserDutyDetail shopUserDutyDetail = new ShopUserDutyDetail(); + shopUserDutyDetail.setDutyId(shopUserDuty.getId()); + shopUserDutyDetail.setAmount(orderDetail.getPriceAmount()); + shopUserDutyDetail.setNum(orderDetail.getNum()); + shopUserDutyDetail.setSkuId(orderDetail.getProductSkuId()); + shopUserDutyDetail.setSkuName(orderDetail.getProductSkuName()); + shopUserDutyDetail.setProductId(orderDetail.getProductId()); + shopUserDutyDetail.setProductName(orderDetail.getProductName()); + detaiList.add(shopUserDutyDetail); + + } + } + if (detaiList.size() > 0) { + shopUserDutyDetailMapper.batchInsert(detaiList); + } + } + ShopUserDutyPay shopUserDutyPay = shopUserDutyPayMapper.selectByDuctIdAndType(shopUserDuty.getId(),orderInfo.getPayType()); + if (Objects.nonNull(shopUserDutyPay)){ + shopUserDutyPay.setAmount(orderInfo.getOrderAmount().add(shopUserDutyPay.getAmount())); + shopUserDutyPayMapper.updateByPrimaryKeySelective(shopUserDutyPay); + }else { + shopUserDutyPay=new ShopUserDutyPay(); + shopUserDutyPay.setDutyId(shopUserDuty.getId()); + shopUserDutyPay.setType(orderInfo.getPayType()); + shopUserDutyPay.setAmount(orderInfo.getOrderAmount()); + shopUserDutyPayMapper.insert(shopUserDutyPay); + } + } else if (type.equals("return")) { + BigDecimal amount = jsonObject.getBigDecimal("amount"); + if (Objects.isNull(shopUserDuty)) { + shopUserDuty = new ShopUserDuty(userId, tbToken.getCreateTime(), 1, BigDecimal.ZERO, loginName, "0", + BigDecimal.ZERO, shopId, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, ""); + shopUserDuty.setReturnAmount(amount); + shopUserDuty.setTokenId(tokenId); + shopUserDuty.setTradeDay(DateUtils.getDay()); + shopUserDutyMapper.insert(shopUserDuty); + } else { + shopUserDuty.setReturnAmount(shopUserDuty.getReturnAmount().add(amount)); + shopUserDutyMapper.updateByPrimaryKeySelective(shopUserDuty); + } + } + } else if (type.equals("wxcreate")) { + String day = DateUtils.getDay(); + Integer orderId = jsonObject.getInteger("orderId"); + TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId); + if (Objects.isNull(orderInfo)) { + throw new MsgException("订单不存在"); + } + List list = orderDetailMapper.selectAllByOrderId(orderId); + BigDecimal cashAmount = BigDecimal.ZERO; + if (orderInfo.getPayType().equals("cash")) { + cashAmount = orderInfo.getPayAmount(); + } + ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByTokenIdAndTradeDay(0, day, orderInfo.getShopId()); + TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId())); + if (Objects.isNull(shopUserDuty)) { + shopUserDuty = new ShopUserDuty(Integer.valueOf(orderInfo.getShopId()), new Date(), 1, orderInfo.getOrderAmount(), "", "0", + orderInfo.getOrderAmount(), Integer.valueOf(orderInfo.getShopId()), BigDecimal.ZERO, cashAmount, BigDecimal.ZERO, ""); + shopUserDuty.setTokenId(0); + shopUserDuty.setType("wx"); + if (Objects.nonNull(shopInfo)) { + shopUserDuty.setUserName(shopInfo.getShopName()); + } + shopUserDuty.setTradeDay(DateUtils.getDay()); + shopUserDutyMapper.insert(shopUserDuty); + List detaiList = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + ShopUserDutyDetail shopUserDutyDetail = new ShopUserDutyDetail(); + shopUserDutyDetail.setDutyId(shopUserDuty.getId()); + shopUserDutyDetail.setAmount(orderDetail.getPriceAmount()); + shopUserDutyDetail.setNum(orderDetail.getNum()); + shopUserDutyDetail.setSkuId(orderDetail.getProductSkuId()); + shopUserDutyDetail.setSkuName(orderDetail.getProductSkuName()); + shopUserDutyDetail.setProductId(orderDetail.getProductId()); + shopUserDutyDetail.setProductName(orderDetail.getProductName()); + detaiList.add(shopUserDutyDetail); + } + if (detaiList.size() > 0) { + shopUserDutyDetailMapper.batchInsert(detaiList); + } + } else { + shopUserDuty.setAmount(shopUserDuty.getAmount().add(orderInfo.getPayAmount())); + shopUserDuty.setCashAmount(shopUserDuty.getCashAmount().add(cashAmount)); + shopUserDuty.setIncomeAmount(shopUserDuty.getIncomeAmount().add(orderInfo.getPayAmount())); + shopUserDuty.setOrderNum(shopUserDuty.getOrderNum() + 1); + shopUserDutyMapper.updateByPrimaryKeySelective(shopUserDuty); + List skuIds = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + skuIds.add(orderDetail.getProductSkuId()); + } + List details = shopUserDutyDetailMapper.selectByDuctId(shopUserDuty.getId(), skuIds); + + Map map = new HashMap<>(); + for (ShopUserDutyDetail shopUserDutyDetail : details) { + map.put(shopUserDutyDetail.getSkuId(), shopUserDutyDetail); + } + List detaiList = new ArrayList<>(); + for (TbOrderDetail orderDetail : list) { + if (map.containsKey(orderDetail.getProductSkuId())) { + ShopUserDutyDetail shopUserDutyDetail = map.get(orderDetail.getProductSkuId()); + shopUserDutyDetail.setNum(shopUserDutyDetail.getNum() + orderDetail.getNum()); + shopUserDutyDetail.setAmount(shopUserDutyDetail.getAmount().add(orderDetail.getPriceAmount().add(orderDetail.getPackAmount()))); + shopUserDutyDetailMapper.updateByPrimaryKeySelective(shopUserDutyDetail); + } else { + ShopUserDutyDetail shopUserDutyDetail = new ShopUserDutyDetail(); + shopUserDutyDetail.setDutyId(shopUserDuty.getId()); + shopUserDutyDetail.setAmount(orderDetail.getPriceAmount()); + shopUserDutyDetail.setNum(orderDetail.getNum()); + shopUserDutyDetail.setSkuId(orderDetail.getProductSkuId()); + shopUserDutyDetail.setSkuName(orderDetail.getProductSkuName()); + shopUserDutyDetail.setProductId(orderDetail.getProductId()); + shopUserDutyDetail.setProductName(orderDetail.getProductName()); + detaiList.add(shopUserDutyDetail); + + } + } + + if (detaiList.size() > 0) { + shopUserDutyDetailMapper.batchInsert(detaiList); + } + } + ShopUserDutyPay shopUserDutyPay = shopUserDutyPayMapper.selectByDuctIdAndType(shopUserDuty.getId(),orderInfo.getPayType()); + if (Objects.nonNull(shopUserDutyPay)){ + shopUserDutyPay.setAmount(orderInfo.getOrderAmount().add(shopUserDutyPay.getAmount())); + shopUserDutyPayMapper.updateByPrimaryKeySelective(shopUserDutyPay); + }else { + shopUserDutyPay=new ShopUserDutyPay(); + shopUserDutyPay.setDutyId(shopUserDuty.getId()); + shopUserDutyPay.setType(orderInfo.getPayType()); + shopUserDutyPay.setAmount(orderInfo.getOrderAmount()); + shopUserDutyPayMapper.insert(shopUserDutyPay); + } + }else{ + if (type.equals("close")){ + shopUserDutyMapper.updateStatusByTokenId(tbToken.getId()); + } + } + } catch (Exception e) { + e.getMessage(); + } + } + + public static void main(String[] args) { + String sss = "{\"data\":{\"orderId\":\"1\",\"payAmount\":3.60,\"returnDetails\":[{\"cetyId\":\"2\",\"id\":\"1\",\"number\":\"5\"},{\"cetyId\":\"3\",\"id\":\"2\",\"number\":\"9\"}]},\"type\":\"return\",\"token\":\"黑龙江省王大秃子屯\"}"; + JSONObject jsonObject = JSON.parseObject(sss); + JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("returnDetails"); + for (int i = 0;i list = tbPrintMachineMapper.selectByShopId(orderInfo.getShopId()); + + if (ObjectUtil.isEmpty(list) || list.size() <= 0) { + log.error("此店铺没有对应的打印机设备"); + return; + } + + + list.parallelStream().forEach(it->{ + if (!"network".equals(it.getConnectionType())) { + log.error("非网络打印机:{},{}",it.getAddress(),it.getConnectionType()); + return; + + } + + if (!"1".equals(it.getStatus().toString())) { + log.error("打印机状态异常:{},{}",it.getAddress(),it.getStatus()); + return; + } + + JSONObject config = JSONObject.parseObject(it.getConfig()); + String model = config.getString("model"); + + String printerNum = config.getString("printerNum"); + + String feet = config.getString("feet"); + + String autoCut = config.getString("autoCut"); + List categoryInfos=JSONUtil.parseJSONStr2TList(config.getJSONArray("categoryList").toString(),CategoryInfo.class); + + switch (it.getContentType()){ + case "yxyPrinter": + yxyPrinter(it,model,orderInfo,shopInfo,printerNum,categoryInfos); + break; + case "fePrinter": + fePrinter(it,model,orderInfo,shopInfo,printerNum,categoryInfos); + break; + } + }); + + + + }catch (Exception e){ + e.printStackTrace(); + } + + } + + /** + * 博时结云打印机 + * @param tbPrintMachineWithBLOBs + * @param model + * @param orderInfo + * @param shopInfo + * @param printerNum + */ + private void yxyPrinter(TbPrintMachineWithBLOBs tbPrintMachineWithBLOBs,String model,TbOrderInfo orderInfo,TbShopInfo shopInfo,String printerNum, List categoryInfos){ + String orderId=orderInfo.getId().toString(); + + + switch (tbPrintMachineWithBLOBs.getSubType()) { + case "label": //标签打印机 + break; + case "cash": //小票打印机 + switch (model) { + case "normal": //普通出单 + + + if("return".equals(orderInfo.getOrderType())){ + List tbOrderDetails=tbOrderDetailMapper.selectAllByOrderId(Integer.valueOf(orderId)); + if(ObjectUtil.isNotEmpty(tbOrderDetails)&&tbOrderDetails.size()>0){ + List detailList = new ArrayList<>(); + tbOrderDetails.parallelStream().forEach(it->{ + String categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + log.info("获取当前类别是否未打印类别:{}",count); + + + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getProductSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getProductName(), it.getNum().toString(), it.getPriceAmount().toPlainString(), remark); + detailList.add(detail); + + }); + String balance = "0"; + + if ("deposit".equals(orderInfo.getPayType())) { + TbShopUser user = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMemberId())); + if (ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getAmount())) { + balance = user.getAmount().toPlainString(); + } + } + + + if(ObjectUtil.isNotEmpty(detailList)&&detailList.size()>0){ + OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", ObjectUtil.isEmpty(orderInfo.getMasterId())||ObjectUtil.isNull(orderInfo.getMasterId())?orderInfo.getTableName():orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, orderInfo.getPayType(), "0", detailList,orderInfo.getRemark()); + + String printType="退款单"; + + String data= PrinterUtils.getCashPrintData(detailPO,printType,"return"); + PrinterUtils.printTickets(1, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + } + + return; + } + + List cashierCarts = tbCashierCartMapper.selectByOrderId(orderInfo.getId().toString(),"final"); + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + List detailList = new ArrayList<>(); + cashierCarts.parallelStream().forEach(it -> { + String categoryId; + if(ObjectUtil.isEmpty(it.getCategoryId())){ + categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + } else { + categoryId = it.getCategoryId(); + } + + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + log.info("获取当前类别是否未打印类别:{}",count); + + if(count>0){ + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getName(), it.getNumber().toString(), it.getTotalAmount().toPlainString(), remark); + detailList.add(detail); + } + }); + + String balance = "0"; + + if ("deposit".equals(orderInfo.getPayType())) { + TbShopUser user = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMemberId())); + if (ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getAmount())) { + balance = user.getAmount().toPlainString(); + } + } + if(ObjectUtil.isNotEmpty(detailList)&&detailList.size()>0){ + OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getOrderType().equals("miniapp")?orderInfo.getTableName():orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance,(ObjectUtil.isEmpty(orderInfo.getPayType())||ObjectUtil.isNull(orderInfo.getPayType())?"":orderInfo.getPayType() ), "0", detailList,orderInfo.getRemark()); +// OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, orderInfo.getPayType(), "0", detailList); + + String printType="结算单"; + + String data= PrinterUtils.getCashPrintData(detailPO,printType,orderInfo.getOrderType()); + PrinterUtils.printTickets(3, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + + } + + break; + case "one": //一菜一品 + + if("return".equals(orderInfo.getOrderType())){ + log.error("退款但不打印出品小票"); + return; + } + cashierCarts = tbCashierCartMapper.selectByOrderId(orderId,"final"); + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + + cashierCarts.parallelStream().forEach(it -> { + + String categoryId; + if(ObjectUtil.isEmpty(it.getCategoryId())){ + categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + } else { + categoryId = it.getCategoryId(); + } + + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + + log.info("获取当前类别是否未打印类别:{}",count); + + if(count>0){ + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + String data = PrinterUtils.getPrintData(orderInfo.getMasterId(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), it.getName(), it.getNumber(), remark); + PrinterUtils.printTickets(3, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + }); + } + break; + case "category": //分类出单 + break; + } + + break; + case "kitchen": //出品打印机 + break; + } + } + + + + + private void fePrinter(TbPrintMachineWithBLOBs tbPrintMachineWithBLOBs,String model,TbOrderInfo orderInfo,TbShopInfo shopInfo,String printerNum, List categoryInfos){ + String orderId=orderInfo.getId().toString(); + switch (tbPrintMachineWithBLOBs.getSubType()) { + case "label": //标签打印机 + List cashierCarts = tbCashierCartMapper.selectByOrderId(orderInfo.getId().toString(),"final"); + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + cashierCarts.parallelStream().forEach(it->{ + + String categoryId; + if(ObjectUtil.isEmpty(it.getCategoryId())){ + categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + } else { + categoryId = it.getCategoryId(); + } + + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + + log.info("获取当前类别是否未打印类别:{}",count); + + + if(count>0) { + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + for(int i=0;i list = tbPrintMachineMapper.selectByShopId(orderInfo.getShopId()); + + if (ObjectUtil.isEmpty(list) || list.size() <= 0) { + log.error("此店铺没有对应的打印机设备"); + return Result.fail(CodeEnum.printmachinenoexsit); + } + + list.parallelStream().forEach(tbPrintMachineWithBLOBs->{ + if (!"network".equals(tbPrintMachineWithBLOBs.getConnectionType())) { + log.error("非网络打印机"); + return; + } + + if (!"1".equals(tbPrintMachineWithBLOBs.getStatus().toString())) { + log.error("打印机状态异常"); + return; + } + + JSONObject config = JSONObject.parseObject(tbPrintMachineWithBLOBs.getConfig()); + String model = config.getString("model"); + + String printerNum = config.getString("printerNum"); + + String feet = config.getString("feet"); + + String autoCut = config.getString("autoCut"); + + List categoryInfos=JSONUtil.parseJSONStr2TList(config.getJSONArray("categoryList").toString(),CategoryInfo.class); + + switch (tbPrintMachineWithBLOBs.getContentType()){ + case "yxyPrinter": + yxyPrinter(tbPrintMachineWithBLOBs,model,orderInfo,shopInfo,printerNum,categoryInfos,type,ispre); + break; + case "fePrinter": + fePrinter(tbPrintMachineWithBLOBs,model,orderInfo,shopInfo,printerNum,categoryInfos,type,ispre); + break; + } + }); + return Result.success(CodeEnum.SUCCESS); + + }catch (Exception e){ + e.printStackTrace(); + } + + return Result.fail(CodeEnum.SYS_EXCEPTION); + + } + + + + + /** + * 博时结云打印机 + * @param tbPrintMachineWithBLOBs + * @param model + * @param orderInfo + * @param shopInfo + * @param printerNum + */ + private Result yxyPrinter(TbPrintMachineWithBLOBs tbPrintMachineWithBLOBs,String model,TbOrderInfo orderInfo,TbShopInfo shopInfo,String printerNum, List categoryInfos,String type,Boolean ispre){ + String orderId=orderInfo.getId().toString(); + + + switch (tbPrintMachineWithBLOBs.getSubType()) { + case "label": //标签打印机 + break; + case "cash": //小票打印机 + switch (model) { + case "normal": //普通出单 + if(!"normal".equals(type)){ + return Result.fail("非小票打印"); + } + + if("return".equals(orderInfo.getOrderType())){ + List tbOrderDetails=tbOrderDetailMapper.selectAllByOrderId(Integer.valueOf(orderId)); + if(ObjectUtil.isNotEmpty(tbOrderDetails)&&tbOrderDetails.size()>0){ + List detailList = new ArrayList<>(); + tbOrderDetails.parallelStream().forEach(it->{ + String categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + log.info("获取当前类别是否未打印类别:{}",count); + + + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getProductSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getProductName(), it.getNum().toString(), it.getPriceAmount().toPlainString(), remark); + detailList.add(detail); + + }); + String balance = "0"; + + if ("deposit".equals(orderInfo.getPayType())) { + TbShopUser user = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMemberId())); + if (ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getAmount())) { + balance = user.getAmount().toPlainString(); + } + } + + + if(ObjectUtil.isNotEmpty(detailList)&&detailList.size()>0){ +// OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, orderInfo.getPayType(), "0", detailList); + OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", ObjectUtil.isEmpty(orderInfo.getMasterId())||ObjectUtil.isNull(orderInfo.getMasterId())?orderInfo.getTableName():orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, orderInfo.getPayType(), "0", detailList,orderInfo.getRemark()); + + String printType="退款单"; + + String data= PrinterUtils.getCashPrintData(detailPO,printType,"return"); + PrinterUtils.printTickets(1, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + } + + return Result.success(CodeEnum.SUCCESS); + } + + + List cashierCarts =new ArrayList<>(); + if(ispre){ + cashierCarts=tbCashierCartMapper.selectByOrderId(orderInfo.getId().toString(),"create"); + }else { + cashierCarts = tbCashierCartMapper.selectByOrderId(orderInfo.getId().toString(),"final"); + } + + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + List detailList = new ArrayList<>(); + cashierCarts.parallelStream().forEach(it -> { + String categoryId; + if(ObjectUtil.isEmpty(it.getCategoryId())){ + categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + } else { + categoryId = it.getCategoryId(); + } + + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + + if(count>0){ + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getName(), it.getNumber().toString(), it.getTotalAmount().toPlainString(), remark); + detailList.add(detail); + } + + }); + + String balance = "0"; + + if ("deposit".equals(orderInfo.getPayType())) { + TbShopUser user = tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMemberId())); + if (ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getAmount())) { + balance = user.getAmount().toPlainString(); + } + } + if(ObjectUtil.isNotEmpty(detailList)&&detailList.size()>0){ + OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getOrderType().equals("miniapp")?orderInfo.getTableName():orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance,(ObjectUtil.isEmpty(orderInfo.getPayType())||ObjectUtil.isNull(orderInfo.getPayType())?"":orderInfo.getPayType() ), "0", detailList,orderInfo.getRemark()); + String printType="结算单"; + if(ispre){ + printType="预结算单"; + } + + if("return".equals(orderInfo.getOrderType())){ + printType="退款单"; + } + + + String data= PrinterUtils.getCashPrintData(detailPO,printType,orderInfo.getOrderType()); + PrinterUtils.printTickets(3, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + + } + + break; + case "one": //一菜一品 + if(!"one".equals(type)){ + return Result.fail("非出品打印"); + } + + if(ispre){ + return Result.fail("预结算单不打印菜单"); + } + cashierCarts = tbCashierCartMapper.selectByOrderId(orderId,"final"); + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + + cashierCarts.parallelStream().forEach(it -> { + + String categoryId; + if(ObjectUtil.isEmpty(it.getCategoryId())){ + categoryId= tbProductMapper.selectByPrimaryKey(Integer.valueOf(it.getProductId())).getCategoryId(); + } else { + categoryId = it.getCategoryId(); + } + + + Long count= categoryInfos.stream().filter(c-> + c.getId().toString().equals(categoryId) + ).count(); + + if(count>0){ + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + String data = PrinterUtils.getPrintData(orderInfo.getOrderType().equals("miniapp")?orderInfo.getTableName():orderInfo.getMasterId(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), it.getName(), it.getNumber(), remark); + PrinterUtils.printTickets(3, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data); + } + }); + } + break; + case "category": //分类出单 + if(!"category".equals(type)){ + return Result.fail("非分类打印"); + } + break; + } + + break; + case "kitchen": //出品打印机 + break; + } + + return Result.success(CodeEnum.SUCCESS); + } + + + + + private Result fePrinter(TbPrintMachineWithBLOBs tbPrintMachineWithBLOBs,String model,TbOrderInfo orderInfo,TbShopInfo shopInfo,String printerNum, List categoryInfos,String type,Boolean ispre){ + String orderId=orderInfo.getId().toString(); + switch (tbPrintMachineWithBLOBs.getSubType()) { + case "label": //标签打印机 + if(!"label".equals(type)){ + return Result.fail("非标签打印机"); + } + + if(ispre){ + return Result.fail("预结算单不打印标签"); + } + List cashierCarts = tbCashierCartMapper.selectByOrderId(orderInfo.getId().toString(),"final"); + if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) { + cashierCarts.parallelStream().forEach(it->{ + Long count= categoryInfos.stream().filter(c-> + c.getId().equals(it.getCategoryId()) + ).count(); + + if(count>0) { + TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getSkuId())); + String remark = ""; + if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { + remark = tbProductSkuWithBLOBs.getSpecSnap(); + } + + for(int i=0;i accountMap = new ConcurrentHashMap<>(); + accountMap.put("accountId", account.getId()); + accountMap.put("merchantName", account.getAccount()); + accountMap.put("loginName", tbPlussShopStaff.getAccount()); + accountMap.put("clientType", loginReq.getClientType()); + accountMap.put("shopId", account.getShopId()); + accountMap.put("staffId", tbPlussShopStaff.getId()); + accountMap.put("userCode", tbPlussShopStaff.getCode()); + accountMap.put("token", token); + accountMap.put("loginTime", System.currentTimeMillis()); + if (Objects.nonNull(shopInfo)){ + accountMap.put("shopName", shopInfo.getShopName()); + } + accountMap.put("uuid", uuid); + redisUtil.saveMessage("CART:UUID:" + account.getShopId().concat(account.getId().toString()), uuid); + + return Result.success(CodeEnum.SUCCESS, accountMap); + } + + + public Result logout(String loginName, String clientType, String token, String status) { + + String key = RedisCst.ONLINE_USER.concat(":").concat(clientType).concat(":").concat(loginName); + + String cacheToken = redisUtil.getMessage(key); + + TbToken tbToken = tbTokenMapper.selectByToken(token); + + if (ObjectUtil.isEmpty(tbToken)) { + redisUtil.deleteByKey(key); + return Result.fail(USERNOLOGIN); + } + + if (!"1".equals(tbToken.getStatus()) || "2".equals(tbToken.getStatus()) || "3".equals(tbToken.getStatus())) { + redisUtil.deleteByKey(key); + return Result.fail(USERNOLOGIN); + } + + if (ObjectUtil.isEmpty(cacheToken)) { + return Result.fail(USERNOLOGIN); + } + + if (!cacheToken.equals(token)) { + return Result.fail(TOKENTERROR); + } + redisUtil.deleteByKey(key); + tbToken.setStatus(status); + tbToken.setUpdateTime(new Date()); + tbTokenMapper.updateByPrimaryKey(tbToken); + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("type","close"); + jsonObject.put("token",token); + rabbitProducer.putOrderCollect(jsonObject.toJSONString()); + return Result.success(SUCCESS); + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/MemberService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/MemberService.java new file mode 100644 index 0000000..47c0bd7 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/MemberService.java @@ -0,0 +1,373 @@ +package com.chaozhanggui.system.cashierservice.service; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.RandomUtil; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.model.ScanPayReq; +import com.chaozhanggui.system.cashierservice.model.TradeQueryReq; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.BeanUtil; +import com.chaozhanggui.system.cashierservice.util.MD5Util; +import com.chaozhanggui.system.cashierservice.util.SnowFlakeUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.client.RestTemplate; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Service +public class MemberService { + + + @Autowired + TbShopUserMapper tbShopUserMapper; + + + @Autowired + TbMemberInMapper tbMemberInMapper; + + @Autowired + TbShopInfoMapper tbShopInfoMapper; + + + @Autowired + TbMerchantThirdApplyMapper tbMerchantThirdApplyMapper; + + @Autowired + TbShopUserFlowMapper tbShopUserFlowMapper; + + @Autowired + TbShopPayTypeMapper tbShopPayTypeMapper; + + + + @Value("${gateway.url}") + private String gateWayUrl; + + + + @Autowired + RestTemplate restTemplate; + + + + + + public Result queryMember(String shopId,String phone,int page,int pageSize){ + + PageHelper.startPage(page,pageSize); + List tbShopUsers= tbShopUserMapper.selectByShopId(shopId,phone); + PageInfo pageInfo=new PageInfo(tbShopUsers); + return Result.success(CodeEnum.SUCCESS,pageInfo); + } + + @Transactional(rollbackFor = Exception.class) + public Result createMember(Map map){ + if(ObjectUtil.isEmpty(map)||!map.containsKey("shopId")||ObjectUtil.isEmpty(map.get("shopId")) + || !map.containsKey("phone")||ObjectUtil.isEmpty(map.get("phone")) + ||!map.containsKey("nickName")||ObjectUtil.isEmpty(map.get("nickName")) + ||!map.containsKey("sex")||ObjectUtil.isEmpty(map.get("sex")) + ||!map.containsKey("level") ||ObjectUtil.isEmpty(map.get("level"))|| + !map.containsKey("birthDay")||ObjectUtil.isEmpty(map.get("birthDay")) + ){ + return Result.fail(CodeEnum.PARAM); + } + + String phone=map.get("phone")+""; + + String shopId=map.get("shopId")+""; + + List tbShopUsers= tbShopUserMapper.selectByShopId(shopId,phone); + + if(ObjectUtil.isNotEmpty(tbShopUsers)&&tbShopUsers.get(0).getIsVip().toString().equals("1")){ + return Result.fail(CodeEnum.MEMBERHAVED); + } + + TbShopUser tbShopUser=new TbShopUser(); + tbShopUser.setAmount(BigDecimal.ZERO); + tbShopUser.setCreditAmount(BigDecimal.ZERO); + tbShopUser.setConsumeAmount(BigDecimal.ZERO); + tbShopUser.setConsumeNumber(0); + tbShopUser.setLevelConsume(BigDecimal.ZERO); + tbShopUser.setStatus(Byte.parseByte("1")); + tbShopUser.setShopId(shopId); + tbShopUser.setTelephone(phone); + tbShopUser.setBirthDay(map.get("birthDay")+""); + tbShopUser.setName(map.get("nickName")+""); + tbShopUser.setSex(Byte.parseByte(map.get("sex")+"")); + tbShopUser.setLevel(Byte.parseByte(map.get("level")+"")); + String code= RandomUtil.randomNumbers(6); + tbShopUser.setCode(code); + tbShopUser.setIsVip(Byte.parseByte("1")); + tbShopUser.setCreatedAt(System.currentTimeMillis()); + tbShopUserMapper.insert(tbShopUser); + return Result.success(CodeEnum.SUCCESS); + } + + + + @Transactional(rollbackFor = Exception.class) + public Result memberScanPay(Map map){ + if(ObjectUtil.isEmpty(map)||map.size()<=0 + ||!map.containsKey("shopId")||ObjectUtil.isEmpty(map.get("shopId")) + ||!map.containsKey("memberId")||ObjectUtil.isEmpty(map.get("memberId")) + ||!map.containsKey("amount")||ObjectUtil.isEmpty(map.get("amount")) + ||!map.containsKey("authCode")||ObjectUtil.isEmpty(map.get("authCode")) + ){ + return Result.fail(CodeEnum.PARAM); + } + + String memberId=map.get("memberId")+""; + + String shopId=map.get("shopId")+""; + + + TbShopInfo shopInfo=tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId)); + if(ObjectUtil.isEmpty(shopInfo)||shopInfo==null){ + return Result.fail(CodeEnum.SHOPINFONOEXIST); + } + TbShopUser shopUser= tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId)); + if(ObjectUtil.isEmpty(shopUser)||!"1".equals(shopUser.getIsVip().toString())){ + return Result.fail(CodeEnum.MEMBERNOEXIST); + } + + String authCode=map.get("authCode").toString(); + String qpay=null; + String payTypeCode = authCode.substring(0, 1);// 判断收款码 + + switch (payTypeCode){ + case "1": + qpay="scanCode"; + break; + case "2": + qpay="scanCode"; + break; + } + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(shopId,qpay); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + BigDecimal amount= new BigDecimal(map.get("amount")+"").setScale(2,BigDecimal.ROUND_DOWN); + + TbMemberIn memberIn=new TbMemberIn(); + memberIn.setAmount(amount); + memberIn.setUserId(shopUser.getId()); + memberIn.setCode(shopUser.getCode()); + memberIn.setStatus("7"); + memberIn.setMerchantId(Integer.valueOf(shopInfo.getMerchantId())); + memberIn.setCreateTime(new Date()); + tbMemberInMapper.insert(memberIn); + + + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(shopInfo.getMerchantId())); + + if(ObjectUtil.isEmpty(thirdApply)||ObjectUtil.isNull(thirdApply)){ + return Result.fail(CodeEnum.NOCUSTOMER); + } + + + ScanPayReq scanPayReq=new ScanPayReq(); + scanPayReq.setAppId(thirdApply.getAppId()); + scanPayReq.setTimestamp(System.currentTimeMillis()); + scanPayReq.setAuthCode(authCode); + scanPayReq.setNotifyUrl("http://cas"); + scanPayReq.setConsumeFee(amount.toPlainString()); + + Map reqMap= BeanUtil.transBean2Map(scanPayReq); + scanPayReq.setSign(MD5Util.encrypt(reqMap,thirdApply.getAppToken(),true)); + + + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/scanPay"),scanPayReq,String.class); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())) { + JSONObject object = JSONObject.parseObject(response.getBody()); + if(object.get("code").equals("0")){ + String orderNO=object.getJSONObject("data").get("orderNumber").toString(); + + memberIn.setOrderNo(orderNO); + memberIn.setStatus("0"); + memberIn.setUpdateTime(new Date()); + tbMemberInMapper.updateByPrimaryKeySelective(memberIn); + + //修改客户资金 + shopUser.setAmount(shopUser.getAmount().add(amount)); + shopUser.setUpdatedAt(System.currentTimeMillis()); + tbShopUserMapper.updateByPrimaryKeySelective(shopUser); + + TbShopUserFlow flow=new TbShopUserFlow(); + flow.setShopUserId(shopUser.getId()); + flow.setBizCode("scanMemberIn"); + flow.setBizName("会员扫码充值"); + flow.setAmount(amount); + flow.setBalance(shopUser.getAmount()); + flow.setCreateTime(new Date()); + tbShopUserFlowMapper.insert(flow); + return Result.success(CodeEnum.SUCCESS,memberIn); + }else { + String status=ObjectUtil.isNotEmpty(object.getJSONObject("data"))?object.getJSONObject("data").getString("status"):null; + if(ObjectUtil.isNotNull(status)&&"7".equals(status)){ + String orderNO=object.getJSONObject("data").get("orderNumber").toString(); + memberIn.setOrderNo(orderNO); + memberIn.setUpdateTime(new Date()); + tbMemberInMapper.updateByPrimaryKeySelective(memberIn); + return Result.success(CodeEnum.PAYING,memberIn); + } + return Result.fail(object.getString("msg")); + } + } + + return Result.fail("失败"); + + } + + + public Result queryScanPay(String flowId){ + if(ObjectUtil.isEmpty(flowId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbMemberIn memberIn=tbMemberInMapper.selectByPrimaryKey(Integer.valueOf(flowId)); + + + + TbShopUser shopUser= tbShopUserMapper.selectByPrimaryKey(memberIn.getUserId()); + if(ObjectUtil.isEmpty(shopUser)||!"1".equals(shopUser.getIsVip().toString())){ + return Result.fail(CodeEnum.MEMBERNOEXIST); + } + + + if(memberIn.getStatus().equals("7")){ + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(memberIn.getMerchantId())); + if(ObjectUtil.isEmpty(thirdApply)||ObjectUtil.isNull(thirdApply)){ + return Result.fail(CodeEnum.NOCUSTOMER); + } + TradeQueryReq tradeQueryReq=new TradeQueryReq(); + tradeQueryReq.setAppId(thirdApply.getAppId()); + tradeQueryReq.setTimestamp(System.currentTimeMillis()); + tradeQueryReq.setOrderNumber(memberIn.getOrderNo()); + + Map map= BeanUtil.transBean2Map(tradeQueryReq); + tradeQueryReq.setSign(MD5Util.encrypt(map,thirdApply.getAppToken(),true)); + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/tradeQuery"),tradeQueryReq,String.class); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())){ + JSONObject object=JSONObject.parseObject(response.getBody()); + if(object.get("code").equals("0")){ + JSONObject data=object.getJSONObject("data"); + if("1".equals(data.getString("status"))){ + String orderNO=object.getJSONObject("data").get("orderNumber").toString(); + + memberIn.setOrderNo(orderNO); + memberIn.setStatus("0"); + memberIn.setUpdateTime(new Date()); + tbMemberInMapper.updateByPrimaryKeySelective(memberIn); + + //修改客户资金 + shopUser.setAmount(shopUser.getAmount().add(memberIn.getAmount())); + shopUser.setUpdatedAt(System.currentTimeMillis()); + tbShopUserMapper.updateByPrimaryKeySelective(shopUser); + + TbShopUserFlow flow=new TbShopUserFlow(); + flow.setShopUserId(shopUser.getId()); + flow.setBizCode("scanMemberIn"); + flow.setBizName("会员扫码充值"); + flow.setAmount(memberIn.getAmount()); + flow.setBalance(shopUser.getAmount()); + flow.setCreateTime(new Date()); + tbShopUserFlowMapper.insert(flow); + return Result.success(CodeEnum.SUCCESS,memberIn); + } + } + } + } + + return Result.success(CodeEnum.SUCCESS,memberIn); + } + + + + + @Transactional(rollbackFor = Exception.class) + public Result memberAccountPay(Map map){ + if(ObjectUtil.isEmpty(map)||map.size()<=0 + ||!map.containsKey("shopId")||ObjectUtil.isEmpty(map.get("shopId")) + ||!map.containsKey("memberId")||ObjectUtil.isEmpty(map.get("memberId")) + ||!map.containsKey("amount")||ObjectUtil.isEmpty(map.get("amount")) + ){ + return Result.fail(CodeEnum.PARAM); + } + + String memberId=map.get("memberId")+""; + + String shopId=map.get("shopId")+""; + + + TbShopInfo shopInfo=tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId)); + if(ObjectUtil.isEmpty(shopInfo)||shopInfo==null){ + return Result.fail(CodeEnum.SHOPINFONOEXIST); + } + TbShopUser shopUser= tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId)); + if(ObjectUtil.isEmpty(shopUser)||!"1".equals(shopUser.getIsVip().toString())){ + return Result.fail(CodeEnum.MEMBERNOEXIST); + } + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(shopId,"cash"); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + BigDecimal amount= new BigDecimal(map.get("amount")+"").setScale(2,BigDecimal.ROUND_DOWN); + + TbMemberIn memberIn=new TbMemberIn(); + memberIn.setAmount(amount); + memberIn.setUserId(shopUser.getId()); + memberIn.setCode(shopUser.getCode()); + memberIn.setStatus("0"); + memberIn.setCreateTime(new Date()); + memberIn.setTradeNo("cash".concat(SnowFlakeUtil.generateOrderNo())); + tbMemberInMapper.insert(memberIn); + + shopUser.setAmount(shopUser.getAmount().add(amount)); + shopUser.setUpdatedAt(System.currentTimeMillis()); + tbShopUserMapper.updateByPrimaryKeySelective(shopUser); + + TbShopUserFlow flow=new TbShopUserFlow(); + flow.setShopUserId(shopUser.getId()); + flow.setBizCode("cashMemberIn"); + flow.setBizName("会员现金充值"); + flow.setAmount(amount); + flow.setBalance(shopUser.getAmount()); + flow.setCreateTime(new Date()); + tbShopUserFlowMapper.insert(flow); + + return Result.success(CodeEnum.SUCCESS); + + } + + + public Result queryMemberAccount(String memberId,int page, int pageSize){ + if(ObjectUtil.isEmpty(memberId)){ + return Result.fail(CodeEnum.PARAM); + } + PageHelper.startPage(page,pageSize); + List> list=tbShopUserFlowMapper.selectByMemberAccountFlow(memberId); + PageInfo pageInfo=new PageInfo(list); + return Result.success(CodeEnum.SUCCESS,pageInfo); + + } + + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java new file mode 100644 index 0000000..fe29774 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -0,0 +1,626 @@ +package com.chaozhanggui.system.cashierservice.service; + +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.entity.po.CartPo; +import com.chaozhanggui.system.cashierservice.entity.po.OrderPo; +import com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo; +import com.chaozhanggui.system.cashierservice.entity.vo.CartVo; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.DateUtils; +import com.chaozhanggui.system.cashierservice.util.RedisUtil; +import com.chaozhanggui.system.cashierservice.util.TokenUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +@Service +@Slf4j +public class OrderService { + + + @Autowired + TbShopInfoMapper tbShopInfoMapper; + + @Autowired + TbProductMapper tbProductMapper; + + @Autowired + TbProductSkuMapper tbProductSkuMapper; + @Autowired + TbProductSpecMapper tbProductSpecMapper; + + @Autowired + TbCashierCartMapper cashierCartMapper; + @Autowired + TbOrderInfoMapper tbOrderInfoMapper; + @Autowired + TbOrderDetailMapper orderDetailMapper; + @Autowired + TbProductSkuResultMapper tbProductSkuResultMapper; + @Autowired + TbTokenMapper tokenMapper; + @Autowired + RedisUtil redisUtil; + private static ConcurrentHashMap> codeMap = new ConcurrentHashMap<>(); + private static ConcurrentHashMap> userMap = new ConcurrentHashMap<>(); + + @Transactional(rollbackFor = Exception.class) + public Result createCart(String masterId, String productId, String shopId, Integer skuId, Integer number, + String userId, String clientType, Integer cartId, String isGift, String isPack, String uuid, String type) { + if (Objects.isNull(number) || number < 0) { + return Result.fail(CodeEnum.NUMBER); + } + if (ObjectUtil.isEmpty(productId) || ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(skuId) || ObjectUtil.isEmpty(number)) { + return Result.fail(CodeEnum.PARAM); + } + TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId)); + if (ObjectUtil.isEmpty(shopInfo) || !"1".equals(shopInfo.getOnSale().toString()) || !"1".equals(shopInfo.getStatus().toString())) { + return Result.fail(CodeEnum.SHOPINFONOEXIST); + } + + TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(productId)); + if (ObjectUtil.isEmpty(product) || !"1".equals(product.getStatus().toString())) { + return Result.fail(CodeEnum.PRODUCTINFOERROR); + } + TbProductSkuWithBLOBs skuWithBLOBs; + if ("1".equals(product.getTypeEnum())) { + skuWithBLOBs = tbProductSkuMapper.selectByProduct(Integer.valueOf(productId)); + } else { + skuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(skuId)); + } + if (ObjectUtil.isEmpty(skuWithBLOBs)) { + return Result.fail(CodeEnum.PRODUCTSKUERROR); + } + if (StringUtils.isEmpty(masterId)) { + boolean flag = redisUtil.exists("SHOP:CODE:" + clientType + ":" + shopId); + if (flag) { + String code = redisUtil.getMessage("SHOP:CODE:" + clientType + ":" + shopId); + Integer foodCode = Integer.valueOf(code) + 1; + code = "#" + String.format("%03d", foodCode); + redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId, foodCode.toString()); + masterId = code; + } else { + redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId, "1"); + masterId = "#" + String.format("%03d", 1); + } + } + TbCashierCart cart = cashierCartMapper.selectByPrimaryKey(cartId); + if (Objects.nonNull(cart)) { + cart.setSkuId(skuId.toString()); + cart.setNumber(number); + cart.setIsGift(isGift); + cart.setIsPack(isPack); + if (isGift.equals("false")) { + cart.setTotalAmount(new BigDecimal(number).multiply(skuWithBLOBs.getSalePrice())); + } else { + cart.setTotalAmount(BigDecimal.ZERO); + } + if (isPack.equals("false")){ + cart.setPackFee(BigDecimal.ZERO); + }else { + cart.setPackFee(new BigDecimal(number).multiply(product.getPackFee())); + } + cart.setTotalNumber(number); + cart.setUuid(uuid); + cashierCartMapper.updateByPrimaryKeySelective(cart); + } else { + List list = cashierCartMapper.selectALlByMasterId(masterId, "create"); + TbCashierCart cashierCart = cashierCartMapper.selectByDetail(masterId, productId, shopId, skuId.toString(), DateUtils.getDay(), uuid); + if (number > 0) { + if (Objects.isNull(cashierCart)) { + cashierCart = new TbCashierCart(); + cashierCart.setCoverImg(product.getCoverImg()); + cashierCart.setCreatedAt(System.currentTimeMillis()); + cashierCart.setIsSku(product.getTypeEnum()); + cashierCart.setMasterId(masterId); + cashierCart.setUuid(uuid); + cashierCart.setMerchantId(userId); + cashierCart.setName(product.getName()); + cashierCart.setProductId(productId); + cashierCart.setSalePrice(skuWithBLOBs.getSalePrice()); + cashierCart.setSkuId(skuWithBLOBs.getId().toString()); + cashierCart.setShopId(shopId); + cashierCart.setTradeDay(DateUtils.getDay()); + cashierCart.setStatus("create"); + cashierCart.setIsPack(isPack); + cashierCart.setIsGift(isGift); + if (isGift.equals("false")) { + cashierCart.setTotalAmount(new BigDecimal(number).multiply(skuWithBLOBs.getSalePrice())); + } else { + cashierCart.setTotalAmount(BigDecimal.ZERO); + } + if (isPack.equals("false")){ + cashierCart.setPackFee(BigDecimal.ZERO); + }else { + cashierCart.setPackFee(new BigDecimal(number).multiply(product.getPackFee())); + cashierCart.setTotalAmount(cashierCart.getTotalAmount().add(cashierCart.getPackFee())); + + } + cashierCart.setTotalNumber(number); + cashierCart.setUserId(Integer.valueOf(userId)); + cashierCart.setNumber(number); + cashierCart.setUuid(uuid); + cashierCart.setCategoryId(product.getCategoryId()); + list.add(cashierCart); + cashierCartMapper.insert(cashierCart); + } else { + if (type.equals("add")) { + cashierCart.setNumber(cashierCart.getNumber() + number); + + } else { + cashierCart.setNumber(number); + } + if (isPack.equals("false")){ + cashierCart.setPackFee(BigDecimal.ZERO); + }else { + cashierCart.setPackFee(new BigDecimal(number).multiply(product.getPackFee())); + } + cashierCart.setTotalAmount(new BigDecimal(cashierCart.getNumber()).multiply(skuWithBLOBs.getSalePrice()).add(cashierCart.getPackFee())); + cashierCartMapper.updateByPrimaryKeySelective(cashierCart); + } + } else { + cashierCartMapper.updateStatus(cashierCart.getId(), "close"); + } + } + redisUtil.addSet("SHOP:CODE:SET" + clientType + ":" + shopId + ":" + DateUtils.getDay(),masterId.substring(1,masterId.length())); + return Result.success(CodeEnum.SUCCESS, masterId); + } + + public Result queryCart(String masterId, String shopId) { + if (StringUtils.isEmpty(shopId)) { + return Result.fail(CodeEnum.SHOPINFONOEXIST); + } + String day = DateUtils.getDay(); + List list = cashierCartMapper.selectByMaskerId(masterId, Integer.valueOf(shopId),"create"); + if (list.size() < 1){ + list = cashierCartMapper.selectByMaskerId(masterId, Integer.valueOf(shopId), "refund"); + if (list.size() > 0){ + if (list.size() < 1) { + return Result.fail(CodeEnum.CARTJH); + } + int orderId = 0; + String uuid = ""; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + orderId = Integer.valueOf(cashierCart.getOrderId()); + break; + } + } + cashierCartMapper.updateStatusByMaster(Integer.valueOf(shopId), masterId, "create", day, uuid); + if (orderId > 0) { + tbOrderInfoMapper.updateStatusById(orderId, "cancelled"); + orderDetailMapper.updateStatusByOrderId(orderId, "cancelled"); + } + } + } + Map map = new HashMap<>(); + map.put("list", list); + map.put("masterId", masterId); + BigDecimal totalAmount = BigDecimal.ZERO; + BigDecimal packAmount = BigDecimal.ZERO; + for (TbCashierCart cashierCart : list) { + totalAmount = totalAmount.add(cashierCart.getTotalAmount()); + if (cashierCart.getIsPack().equals("true")) { + packAmount = packAmount.add(cashierCart.getPackFee()); + } + TbProductSkuWithBLOBs skuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId())); + if (Objects.nonNull(skuWithBLOBs)) { + cashierCart.setSkuName(skuWithBLOBs.getSpecSnap()); + } + TbProduct tbProduct = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId())); + if (Objects.nonNull(tbProduct)) { + TbProductSpec tbProductSpec = tbProductSpecMapper.selectByPrimaryKey(tbProduct.getSpecId()); + cashierCart.setTbProductSpec(tbProductSpec); + } +// TbProductSkuResult skuResult = tbProductSkuResultMapper.selectByPr imaryKey(Integer.valueOf(cashierCart.getProductId())); + } + QueryCartPo queryCartPo = cashierCartMapper.selectProductNumByMarketId(day, shopId, masterId); + queryCartPo.setPackAmount(packAmount); + queryCartPo.setTotalAmount(totalAmount.add(packAmount)); + map.put("amount", queryCartPo); + int num = cashierCartMapper.selectqgList(shopId); + map.put("num", num); + return Result.success(CodeEnum.SUCCESS, map); + } + + @Transactional(rollbackFor = Exception.class) + public Result delCart(String masterId, Integer cartId) { + cashierCartMapper.deleteByCartId(masterId, cartId); + return Result.success(CodeEnum.SUCCESS); + } + + @Transactional(rollbackFor = Exception.class) + public Result createOrder(OrderVo orderVo, String clientType, String token) { + String day = DateUtils.getDay(); + List list = cashierCartMapper.selectAllCreateOrder(orderVo.getMasterId(), orderVo.getShopId(), day, "create", orderVo.getUuid()); + if (list.size() < 1) { + list = cashierCartMapper.selectAllCreateOrder(orderVo.getMasterId(), orderVo.getShopId(), day, "create", orderVo.getUuid()); + } + BigDecimal totalAmount = BigDecimal.ZERO; + BigDecimal packAMount = BigDecimal.ZERO; + BigDecimal feeAmount = BigDecimal.ZERO; + BigDecimal saleAmount = BigDecimal.ZERO; + Map skuMap = new HashMap<>(); + Map productMap = new HashMap<>(); + List orderDetails = new ArrayList<>(); + String masterId = ""; + int orderId = 0; + for (TbCashierCart cashierCart : list) { + TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId())); + totalAmount = totalAmount.add(cashierCart.getTotalAmount()); + packAMount = packAMount.add(cashierCart.getPackFee()); + feeAmount = cashierCart.getPackFee(); + if (Objects.nonNull(tbProduct)) { + saleAmount = saleAmount.add(tbProduct.getSalePrice()); + } + skuMap.put(tbProduct.getId(), tbProduct); + TbOrderDetail orderDetail = new TbOrderDetail(); + orderDetail.setCreateTime(new Date()); + orderDetail.setNum(cashierCart.getNumber()); + orderDetail.setPrice(cashierCart.getSalePrice()); + if (cashierCart.getIsPack().equals("true")) { + orderDetail.setPriceAmount(cashierCart.getTotalAmount().add(cashierCart.getPackFee())); + } else { + orderDetail.setPriceAmount(cashierCart.getTotalAmount()); + } + orderDetail.setProductId(Integer.valueOf(cashierCart.getProductId())); + orderDetail.setProductSkuId(Integer.valueOf(cashierCart.getSkuId())); + orderDetail.setProductSkuName(tbProduct.getSpecSnap()); + orderDetail.setProductName(cashierCart.getName()); + orderDetail.setShopId(orderVo.getShopId()); + orderDetail.setPackAmount(cashierCart.getPackFee()); + orderDetail.setStatus("unpaid"); + orderDetail.setProductImg(cashierCart.getCoverImg()); + masterId = cashierCart.getMasterId(); + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + orderId = Integer.valueOf(cashierCart.getOrderId()); + } + orderDetails.add(orderDetail); + } + String orderNo = generateOrderNumber(); + TbToken tbToken = tokenMapper.selectByToken(token); + TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId); + if (orderId > 0) { +// if (!orderInfo.getStatus().equals("unpaid")){ +// return Result.fail(CodeEnum.ORDERCREATE); +// } + orderDetailMapper.deleteByOUrderId(orderId); +// orderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId); + orderInfo.setUpdatedAt(System.currentTimeMillis()); + orderInfo.setSettlementAmount(totalAmount); + orderInfo.setAmount(totalAmount); + orderInfo.setOriginAmount(totalAmount); + orderInfo.setStatus("unpaid"); + orderInfo.setOrderAmount(totalAmount.add(packAMount)); + orderInfo.setFreightAmount(feeAmount); + orderInfo.setProductAmount(saleAmount); + orderInfo.setTradeDay(DateUtils.getDay()); + orderInfo.setUserId(orderVo.getUserId()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + } else { + orderInfo = new TbOrderInfo(orderNo, totalAmount, packAMount, totalAmount, saleAmount, totalAmount.add(packAMount), feeAmount, "", + "table", "cash", orderVo.getMerchantId().toString(), orderVo.getShopId().toString(), + "", (byte) 1, day, masterId); + orderInfo.setMasterId(masterId); + orderInfo.setRemark(orderVo.getRemark()); + orderInfo.setUserId(orderVo.getUserId()); + if (Objects.nonNull(tbToken)){ + orderInfo.setTokenId(tbToken.getId()); + } + tbOrderInfoMapper.insert(orderInfo); + orderId = orderInfo.getId(); + } + for (TbOrderDetail orderDetail : orderDetails) { + orderDetail.setOrderId(orderId); + orderDetailMapper.insert(orderDetail); + } + boolean flag = true; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + flag = false; + } + cashierCart.setOrderId(orderId + ""); + cashierCart.setUpdatedAt(System.currentTimeMillis()); + cashierCartMapper.updateByPrimaryKeySelective(cashierCart); + } + if (flag) { + redisUtil.deleteByKey("SHOP:CODE:USER:" + clientType + ":" + orderVo.getShopId() + ":" + day + orderVo.getUserId()); + } + return Result.success(CodeEnum.SUCCESS, orderInfo); + } + + public synchronized String generateOrderCode(String day, String clientType, String shopId) { + String code = redisUtil.getMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day); + // 使用顺序递增的计数器生成取餐码 + String orderCode = ""; + if (StringUtils.isEmpty(code)) { + orderCode = "1"; + redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day,"1"); + } else { + orderCode = code; + } + redisUtil.getIncrNum("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, "2"); + boolean flag = redisUtil.execsSet("SHOP:CODE:SET" + clientType + ":" + shopId + ":" + day,orderCode); + if (flag){ + return generateOrderCode(day,clientType,shopId); + } + // 增加计数器 + + return orderCode; + } + + public Result createCode(String shopId, String clientType, String userId, String type) { + String day = DateUtils.getDay(); + JSONObject jsonObject = new JSONObject(); + String userCode = redisUtil.getMessage("SHOP:CODE:USER:" + clientType + ":" + shopId + ":" + day + userId); + if ("1".equals(type)) { + String code = "#" + generateOrderCode(day, clientType, shopId); + redisUtil.saveMessage("SHOP:CODE:USER:" + clientType + ":" + shopId + ":" + day + userId, code); + jsonObject.put("code", code); + } else { + if (StringUtils.isEmpty(userCode)) { + String code = "#" + generateOrderCode(day, clientType, shopId); + redisUtil.saveMessage("SHOP:CODE:USER:" + clientType + ":" + shopId + ":" + day + userId, code); + jsonObject.put("code", code); + } else { + jsonObject.put("code", userCode); + } + } + + +// String day = DateUtils.getDay(); +// boolean flag = redisUtil.exists("SHOP:CODE:" + clientType + ":" + shopId + ":" + day); +// JSONObject jsonObject = new JSONObject(); +// if (flag) { +// String code = redisUtil.getMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day); +// Integer foodCode = Integer.valueOf(code) + 1; +// code = "#" + foodCode; +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, foodCode.toString()); +// jsonObject.put("code", code); +// } else { +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, "1"); +// jsonObject.put("code", "#" + 1); +// } + +// Integer foodCode = Integer.valueOf(code) + 1; +// code = "#" + foodCode; +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, foodCode.toString()); + +// } else { +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, "1"); +// jsonObject.put("code", "#" + 1); +// } + +// boolean flag = redisUtil.exists("SHOP:CODE:" + clientType + ":" + shopId); +// JSONObject jsonObject = new JSONObject(); +// if (flag) { +// String code = redisUtil.getMessage("SHOP:CODE:" + clientType + ":" + shopId); +// Integer foodCode = Integer.valueOf(code) + 1; +// code = "#" + foodCode; +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId, foodCode.toString()); +// jsonObject.put("code",code); +// } else { +// redisUtil.saveMessage("SHOP:CODE:" + clientType + ":" + shopId, "1"); +// jsonObject.put("code","#" + 1); +// } +// int num = cashierCartMapper.selectqgList(shopId); + jsonObject.put("uuid", redisUtil.getMessage("CART:UUID:" + shopId.concat(userId))); + return Result.success(CodeEnum.SUCCESS, jsonObject); + } + + public String generateOrderNumber() { + String date = DateUtils.getSdfTimes(); + Random random = new Random(); + int randomNum = random.nextInt(900) + 100; + return "DD" + date + randomNum; + } + + public Result getCartList(Integer shopId) { + List list = cashierCartMapper.selectCartList(shopId); + return Result.success(CodeEnum.SUCCESS, list); + } + + + @Transactional(rollbackFor = Exception.class) + public Result cartStatus(Integer shopId, String masterId, String status, String userId, String uuid, String clientType) { + String newUuid = redisUtil.getMessage("CART:UUID:" + shopId + userId); + String day = DateUtils.getDay(); + if ("true".equals(status)) { + List list = cashierCartMapper.selectAllCreateOrder(masterId, shopId, day, "create", uuid); + if (list.size() < 1) { + return Result.fail(CodeEnum.CREATEORDER); + } + BigDecimal totalAmount = BigDecimal.ZERO; + BigDecimal packAMount = BigDecimal.ZERO; + BigDecimal feeAmount = BigDecimal.ZERO; + BigDecimal saleAmount = BigDecimal.ZERO; + Map skuMap = new HashMap<>(); + Map productMap = new HashMap<>(); + List orderDetails = new ArrayList<>(); + int orderId = 0; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + orderId = Integer.valueOf(cashierCart.getOrderId()); + break; + } + } + for (TbCashierCart cashierCart : list) { + TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId())); + totalAmount = totalAmount.add(cashierCart.getTotalAmount()); + packAMount = packAMount.add(cashierCart.getPackFee()); + feeAmount = cashierCart.getPackFee(); + if (Objects.nonNull(tbProduct)) { + saleAmount = saleAmount.add(tbProduct.getSalePrice()); + } + skuMap.put(tbProduct.getId(), tbProduct); + TbOrderDetail orderDetail = new TbOrderDetail(); + orderDetail.setCreateTime(new Date()); + orderDetail.setNum(cashierCart.getNumber()); + orderDetail.setPrice(cashierCart.getSalePrice()); + orderDetail.setPriceAmount(cashierCart.getTotalAmount()); + orderDetail.setProductId(Integer.valueOf(cashierCart.getProductId())); + orderDetail.setProductSkuId(Integer.valueOf(cashierCart.getSkuId())); + orderDetail.setProductName(cashierCart.getName()); + orderDetail.setPackAmount(cashierCart.getPackFee()); + orderDetail.setShopId(shopId); + orderDetail.setStatus("pending"); + orderDetails.add(orderDetail); + } + if (orderId > 0) { + orderDetailMapper.deleteByOUrderId(orderId); + TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId); + orderInfo.setUpdatedAt(System.currentTimeMillis()); + orderInfo.setSettlementAmount(totalAmount); + orderInfo.setAmount(totalAmount); + orderInfo.setOriginAmount(totalAmount); + orderInfo.setOrderAmount(totalAmount); + orderInfo.setFreightAmount(feeAmount); + orderInfo.setPayAmount(saleAmount); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + } else { + String orderNo = generateOrderNumber(); + TbOrderInfo orderInfo = new TbOrderInfo(orderNo, totalAmount, packAMount, totalAmount, saleAmount, totalAmount, feeAmount, "", + "table", "case", userId, shopId.toString(), + "", (byte) 1, day, masterId); + orderInfo.setStatus("pending"); + tbOrderInfoMapper.insert(orderInfo); + orderId = orderInfo.getId(); + } + + for (TbOrderDetail orderDetail : orderDetails) { + orderDetail.setOrderId(orderId); + orderDetail.setStatus("pending"); + orderDetailMapper.insert(orderDetail); + } + boolean flag = true; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + flag = false; + } + cashierCart.setOrderId(orderId + ""); + cashierCart.setUpdatedAt(System.currentTimeMillis()); + cashierCart.setPendingAt(System.currentTimeMillis()); + cashierCart.setStatus("refund"); + cashierCart.setUuid(newUuid); + cashierCartMapper.updateByPrimaryKeySelective(cashierCart); + } + + if (flag) { + redisUtil.deleteByKey("SHOP:CODE:USER:" + clientType + ":" + shopId + ":" + day + userId); + ; + } + } else { + + List list = cashierCartMapper.selectAllCreateOrder(masterId, shopId, "", "refund", uuid); + if (list.size() < 1) { + return Result.fail(CodeEnum.CARTJH); + } + int orderId = 0; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + orderId = Integer.valueOf(cashierCart.getOrderId()); + break; + } + } + cashierCartMapper.updateStatusByMaster(shopId, masterId, "create", day, uuid); + if (orderId > 0) { + tbOrderInfoMapper.updateStatusById(orderId, "cancelled"); + orderDetailMapper.updateStatusByOrderId(orderId, "cancelled"); + } + } + return Result.success(CodeEnum.SUCCESS); + } + + public Result getCartPrductSpec(Integer cartId) { + TbCashierCart cashierCart = cashierCartMapper.selectByPrimaryKey(cartId); + if (Objects.isNull(cashierCart)) { + return Result.fail(CodeEnum.CARTSPEC); + } + TbProductSkuResult skuResult = tbProductSkuResultMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId())); + return Result.success(CodeEnum.SUCCESS, skuResult); + } + + @Transactional(rollbackFor = Exception.class) + public Result packall(CartVo cartVo) { + if (StringUtils.isEmpty(cartVo.getShopId())) { + return Result.fail(CodeEnum.SHOPINFONOEXIST); + } + String day = DateUtils.getDay(); + if (StringUtils.isEmpty(cartVo.getStatus())) { + cartVo.setStatus("false"); + } + cashierCartMapper.updateIsGift(cartVo.getMasterId(), cartVo.getStatus(), Integer.valueOf(cartVo.getShopId()), day); + return Result.success(CodeEnum.SUCCESS); + } + + @Transactional(rollbackFor = Exception.class) + public Result clearCart(CartVo cartVo) { + String day = DateUtils.getDay(); + List list = cashierCartMapper.selectAllCreateOrder(cartVo.getMasterId(), Integer.valueOf(cartVo.getShopId()), day, "create", cartVo.getUuid()); + int orderId = 0; + for (TbCashierCart cashierCart : list) { + if (StringUtils.isNotEmpty(cashierCart.getOrderId())) { + orderId = Integer.valueOf(cashierCart.getOrderId()); + } + } + if (orderId > 0) { + tbOrderInfoMapper.updateStatusById(orderId, "cancelled"); + orderDetailMapper.updateStatusByOrderId(orderId, "cancelled"); + } + cashierCartMapper.deleteBymasterId(cartVo.getMasterId(), Integer.valueOf(cartVo.getShopId()), day, "create", cartVo.getUuid()); + return Result.success(CodeEnum.SUCCESS); + } + + + public Result findOrder(Integer shopId, String status, Integer page, Integer size, String orderNo) { + String day = DateUtils.getDay(); + PageHelper.startPage(page, size); + String orderType = ""; + if (StringUtils.isNotEmpty(status)) { + if (status.equals("refund")) { + orderType = "return"; + } else { + orderType = "cash"; + } + } + log.info("orderType:" + orderType); + log.info("status:" + status); + List list = tbOrderInfoMapper.selectAllByShop(shopId, orderType, day, orderNo); + for (OrderPo orderInfo : list) { + if (StringUtils.isEmpty(orderInfo.getImgUrl())) { + orderInfo.setImgUrl("https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240223/a04e0d3beef74d099ebd0fd1f7c41873.jpg"); + } + orderInfo.setZdNo("POS"); + orderInfo.setNames(orderInfo.getProductName().split(",")); + } + PageInfo pageInfo = new PageInfo(list); + return Result.success(CodeEnum.SUCCESS, pageInfo); + } + + public Result orderDetail(Integer shopId, Integer id) { + TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(id); + if (Objects.nonNull(orderInfo)) { + List list = orderDetailMapper.selectAllByOrderId(id); + orderInfo.setDetailList(list); + orderInfo.setUserName("001"); + orderInfo.setZdNo("POS"); + if (StringUtils.isNotEmpty(orderInfo.getTableName())){ + orderInfo.setTableId(orderInfo.getTableName()); + } + orderInfo.setMemberName(""); + } + return Result.success(CodeEnum.SUCCESS, orderInfo); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java new file mode 100644 index 0000000..146e439 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -0,0 +1,636 @@ +package com.chaozhanggui.system.cashierservice.service; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.entity.po.OrderDetailPo; +import com.chaozhanggui.system.cashierservice.exception.MsgException; +import com.chaozhanggui.system.cashierservice.model.ReturnOrderReq; +import com.chaozhanggui.system.cashierservice.model.ReturnWTZInfo; +import com.chaozhanggui.system.cashierservice.model.ScanPayReq; +import com.chaozhanggui.system.cashierservice.model.TradeQueryReq; +import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.client.RestTemplate; + +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.*; + +@Service +@Slf4j +public class PayService { + + + @Autowired + TbOrderInfoMapper tbOrderInfoMapper; + + @Autowired + TbMerchantThirdApplyMapper tbMerchantThirdApplyMapper; + + @Autowired + TbOrderPaymentMapper tbOrderPaymentMapper; + + @Autowired + TbShopPayTypeMapper tbShopPayTypeMapper; + + @Autowired + TbCashierCartMapper tbCashierCartMapper; + + @Autowired + TbShopUserMapper tbShopUserMapper; + + + @Autowired + TbShopUserFlowMapper tbShopUserFlowMapper; + + @Autowired + TbOrderDetailMapper tbOrderDetailMapper; + + @Autowired + RestTemplate restTemplate; + + + @Autowired + RabbitProducer producer; + + + @Value("${gateway.url}") + private String gateWayUrl; + + + @Value("${client.backUrl}") + private String backUrl; + + + + public Result queryPayType(String shopId){ + return Result.success(CodeEnum.SUCCESS,tbShopPayTypeMapper.selectByShopId(shopId)); + } + + + @Transactional(rollbackFor = Exception.class) + public Result scanPay(String orderId,String authCode,String ip,String token){ + if(ObjectUtil.isEmpty(orderId)||ObjectUtil.isEmpty(authCode)||ObjectUtil.isEmpty(ip)){ + return Result.fail(CodeEnum.PARAM); + } + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId)); + + if(ObjectUtil.isEmpty(orderInfo)){ + return Result.fail(CodeEnum.ORDERNOEXIST); + } + + + if(!"unpaid".equals(orderInfo.getStatus())&&!"paying".equals(orderInfo.getStatus())){ + return Result.fail(CodeEnum.ORDERSTATUSERROR); + } + + if(ObjectUtil.isNull(orderInfo.getMerchantId())||ObjectUtil.isEmpty(orderInfo.getMerchantId())){ + return Result.fail(CodeEnum.NOCUSTOMER); + } + + + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMerchantId())); + if(ObjectUtil.isEmpty(thirdApply)||ObjectUtil.isNull(thirdApply)){ + return Result.fail(CodeEnum.NOCUSTOMER); + } + + String payType=null; + String payName=null; + String qpay=null; + + String payTypeCode = authCode.substring(0, 1);// 判断收款码 + + switch (payTypeCode){ + case "1": + payType="wechatPay"; + payName="微信支付"; + qpay="scanCode"; + break; + case "2": + payType="aliPay"; + payName="支付宝支付"; + qpay="scanCode"; + break; + } + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(orderInfo.getShopId(),qpay); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + TbOrderPayment payment=tbOrderPaymentMapper.selectByOrderId(orderId); + if(ObjectUtil.isEmpty(payment)||payment==null){ + payment=new TbOrderPayment(); + payment.setPayTypeId("ysk"); + payment.setAmount(orderInfo.getOrderAmount()); + payment.setPaidAmount(orderInfo.getPayAmount()); + payment.setHasRefundAmount(BigDecimal.ZERO); + payment.setPayName(payName); + payment.setPayType(payType); + payment.setReceived(payment.getAmount()); + payment.setChangeFee(BigDecimal.ZERO); + payment.setMemberId(orderInfo.getMemberId()); + payment.setShopId(orderInfo.getShopId()); + payment.setOrderId(orderInfo.getId().toString()); + payment.setCreatedAt(System.currentTimeMillis()); + payment.setAuthCode(authCode); + tbOrderPaymentMapper.insert(payment); + }else { + payment.setAuthCode(authCode); + payment.setUpdatedAt(System.currentTimeMillis()); + tbOrderPaymentMapper.updateByPrimaryKey(payment); + } + + + + + orderInfo.setPayAmount(orderInfo.getOrderAmount()); + orderInfo.setPayType(qpay); + orderInfo.setUpdatedAt(System.currentTimeMillis()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + + + ScanPayReq scanPayReq=new ScanPayReq(); + scanPayReq.setAppId(thirdApply.getAppId()); + scanPayReq.setTimestamp(System.currentTimeMillis()); + scanPayReq.setAuthCode(authCode); + scanPayReq.setNotifyUrl(backUrl); + scanPayReq.setConsumeFee(payment.getAmount().setScale(2,BigDecimal.ROUND_DOWN).toPlainString()); + + Map map= BeanUtil.transBean2Map(scanPayReq); + scanPayReq.setSign(MD5Util.encrypt(map,thirdApply.getAppToken(),true)); + + + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/scanPay"),scanPayReq,String.class); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())){ + JSONObject object=JSONObject.parseObject(response.getBody()); + if(object.get("code").equals("0")){ + payment.setTradeNumber(object.getJSONObject("data").get("orderNumber").toString()); + payment.setUpdatedAt(System.currentTimeMillis()); + tbOrderPaymentMapper.updateByPrimaryKeySelective(payment); + + //处理支付成功的订单 + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo(object.getJSONObject("data").get("orderNumber").toString()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderId,"final"); + log.info("更新购物车:{}",cartCount); + + //更新子单状态 + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(Integer.valueOf(orderId),"closed"); + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","create"); + jsonObject.put("orderId",orderId); + + producer.putOrderCollect(jsonObject.toJSONString()); + + producer.printMechine(orderId); + + return Result.success(CodeEnum.SUCCESS,object.getJSONObject("data")); + }else { + String status=ObjectUtil.isNotEmpty(object.getJSONObject("data"))?object.getJSONObject("data").getString("status"):null; + if(ObjectUtil.isNotNull(status)&&"7".equals(status)){ + + orderInfo.setStatus("paying"); + orderInfo.setPayOrderNo(payment.getTradeNumber()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + payment.setTradeNumber(object.getJSONObject("data").get("orderNumber").toString()); + payment.setUpdatedAt(System.currentTimeMillis()); + tbOrderPaymentMapper.updateByPrimaryKeySelective(payment); + return Result.success(CodeEnum.PAYING); + } +// orderInfo.setStatus("fail"); +// orderInfo.setPayOrderNo(payment.getTradeNumber()); +// tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + return Result.fail(object.getString("msg")); + } + } + return Result.fail("失败"); + } + + + public Result queryOrder(String orderId,String token){ + if(ObjectUtil.isEmpty(orderId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId)); + + if(ObjectUtil.isEmpty(orderInfo)){ + return Result.fail(CodeEnum.ORDERNOEXIST); + } + + + if("unpaid".equals(orderInfo.getStatus())||"paying".equals(orderInfo.getStatus())){ + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMerchantId())); + if(ObjectUtil.isEmpty(thirdApply)||ObjectUtil.isNull(thirdApply)){ + return Result.fail(CodeEnum.NOCUSTOMER); + } + + TbOrderPayment tbOrderPayment=tbOrderPaymentMapper.selectByOrderId(orderId); + if(ObjectUtil.isNotEmpty(tbOrderPayment)){ + TradeQueryReq tradeQueryReq=new TradeQueryReq(); + tradeQueryReq.setAppId(thirdApply.getAppId()); + tradeQueryReq.setTimestamp(System.currentTimeMillis()); + tradeQueryReq.setOrderNumber(tbOrderPayment.getTradeNumber()); + + Map map= BeanUtil.transBean2Map(tradeQueryReq); + tradeQueryReq.setSign(MD5Util.encrypt(map,thirdApply.getAppToken(),true)); + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/tradeQuery"),tradeQueryReq,String.class); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())){ + JSONObject object=JSONObject.parseObject(response.getBody()); + if(object.get("code").equals("0")){ + JSONObject data=object.getJSONObject("data"); + if("1".equals(data.getString("status"))){ + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo(tbOrderPayment.getTradeNumber()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderId,"final"); + log.info("更新购物车:{}",cartCount); + + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(Integer.valueOf(orderId),"closed"); + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","create"); + jsonObject.put("orderId",orderId); + + producer.putOrderCollect(jsonObject.toJSONString()); + + producer.printMechine(orderId); + } + } + } + } + } + + return Result.success(CodeEnum.SUCCESS,orderInfo); + + } + + + @Transactional(rollbackFor = Exception.class) + public Result accountPay(String orderId,String memberId,String token){ + if(ObjectUtil.isEmpty(orderId)||ObjectUtil.isEmpty(memberId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId)); + if(ObjectUtil.isEmpty(orderInfo)){ + return Result.fail(CodeEnum.ORDERNOEXIST); + } + + + if(!"unpaid".equals(orderInfo.getStatus())){ + return Result.fail(CodeEnum.ORDERSTATUSERROR); + } + + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(orderInfo.getShopId(),"deposit"); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + + TbShopUser user= tbShopUserMapper.selectByPrimaryKey(Integer.valueOf(memberId)); + if(ObjectUtil.isEmpty(user)||!"1".equals(user.getIsVip().toString())){ + return Result.fail(CodeEnum.MEMBERNOEXIST); + } + + if(N.gt(orderInfo.getPayAmount(),user.getAmount())){ + return Result.fail(CodeEnum.MEMBERINSUFFICIENTFUNDS); + } + + user.setAmount(user.getAmount().subtract(orderInfo.getOrderAmount())); + user.setConsumeAmount(user.getConsumeAmount().add(orderInfo.getPayAmount())); + user.setConsumeNumber(user.getConsumeNumber()+1); + user.setUpdatedAt(System.currentTimeMillis()); + tbShopUserMapper.updateByPrimaryKeySelective(user); + + + TbShopUserFlow flow=new TbShopUserFlow(); + flow.setShopUserId(user.getId()); + flow.setBizCode("accountPay"); + flow.setBizName("会员储值卡支付"); + flow.setAmount(orderInfo.getOrderAmount()); + flow.setBalance(user.getAmount()); + flow.setCreateTime(new Date()); + tbShopUserFlowMapper.insert(flow); + + + orderInfo.setPayAmount(orderInfo.getOrderAmount()); + orderInfo.setMemberId(memberId); + orderInfo.setPayType("deposit"); + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo("deposit".concat(SnowFlakeUtil.generateOrderNo())); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderId,"final"); + + + tbOrderDetailMapper.updateStatusByOrderId(Integer.valueOf(orderId),"closed"); + + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(Integer.valueOf(orderId),"closed"); + + log.info("更新购物车:{}",cartCount); + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","create"); + jsonObject.put("orderId",orderId); + + producer.putOrderCollect(jsonObject.toJSONString()); + + producer.printMechine(orderId); + + return Result.success(CodeEnum.SUCCESS); + } + + + + + + + @Transactional(rollbackFor = Exception.class) + public Result cashPay(String orderId,String token){ + if(ObjectUtil.isEmpty(orderId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId)); + + if(ObjectUtil.isEmpty(orderInfo)){ + return Result.fail(CodeEnum.ORDERNOEXIST); + } + + + if(!"unpaid".equals(orderInfo.getStatus())){ + return Result.fail(CodeEnum.ORDERSTATUSERROR); + } + + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(orderInfo.getShopId(),"cash"); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + + orderInfo.setPayAmount(orderInfo.getOrderAmount()); + orderInfo.setPayType("cash"); + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo("cash".concat(SnowFlakeUtil.generateOrderNo())); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderId,"final"); + + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(Integer.valueOf(orderId),"closed"); + log.info("更新购物车:{}",cartCount); + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","create"); + jsonObject.put("orderId",orderId); + + producer.putOrderCollect(jsonObject.toJSONString()); + + + producer.printMechine(orderId); + + return Result.success(CodeEnum.SUCCESS); + } + + + + + @Transactional(rollbackFor = Exception.class) + public Result bankPay(String orderId,String token){ + if(ObjectUtil.isEmpty(orderId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId)); + + if(ObjectUtil.isEmpty(orderInfo)){ + return Result.fail(CodeEnum.ORDERNOEXIST); + } + + + if(!"unpaid".equals(orderInfo.getStatus())){ + return Result.fail(CodeEnum.ORDERSTATUSERROR); + } + + + int count= tbShopPayTypeMapper.countSelectByShopIdAndPayType(orderInfo.getShopId(),"bank"); + if(count<1){ + return Result.fail(CodeEnum.PAYTYPENOEXIST); + } + + + orderInfo.setPayAmount(orderInfo.getOrderAmount()); + orderInfo.setPayType("cash"); + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo("cash".concat(SnowFlakeUtil.generateOrderNo())); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderId,"final"); + + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(Integer.valueOf(orderId),"closed"); + log.info("更新购物车:{}",cartCount); + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","create"); + jsonObject.put("orderId",orderId); + + producer.putOrderCollect(jsonObject.toJSONString()); + + producer.printMechine(orderId); + + return Result.success(CodeEnum.SUCCESS); + } + + + + @Transactional(rollbackFor = Exception.class) + public Result returnOrder(List list,String token){ + if(ObjectUtil.isEmpty(list)||list.size()<=0){ + return Result.fail(CodeEnum.PARAM); + } + + Integer orderId= list.get(0).getOrderId(); + + String remark=list.get(0).getRemark(); + + TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(orderId); + if(ObjectUtil.isEmpty(orderInfo)||orderInfo.getStatus().equals("refund")){ + return Result.fail(CodeEnum.ORDERSTATUSERROR); + } + + List orderDetails= tbOrderDetailMapper.selectAllByOrderIdAndStatus(list,orderId.toString()); + + + String merchantId=orderInfo.getMerchantId(); + String shopId=orderInfo.getShopId(); + String day = DateUtils.getDay(); + String masterId=orderInfo.getMasterId(); + String payType=orderInfo.getPayType(); + String orderNo= generateReturnOrderNumber(); + BigDecimal orderAmount=orderInfo.getPayAmount(); + + + BigDecimal totalAmount=BigDecimal.ZERO; + BigDecimal packAMount=orderInfo.getPackFee(); + BigDecimal saleAmount=BigDecimal.ZERO; + BigDecimal feeAmount=BigDecimal.ZERO; + BigDecimal payAmount=BigDecimal.ZERO; + + List detailPos=new ArrayList<>(); +// //判断是否全量退款 +// if(list.size()==orderDetails.size()){ +// //修改主单状态 +// orderInfo.setStatus("refund"); +// orderInfo.setUpdatedAt(System.currentTimeMillis()); +// tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); +// } + + List returnDetail=new ArrayList<>(); + + List details=new ArrayList<>(); + + for (TbOrderDetail it : orderDetails) { + it=tbOrderDetailMapper.selectByPrimaryKey(it.getId()); + if (it.getStatus().equals("closed")) { + if (it.getStatus().equals("refund")) { + continue; + } + + OrderDetailPo detailPo = new OrderDetailPo(); + totalAmount = totalAmount.add(it.getPriceAmount()); + saleAmount = saleAmount.add(it.getPrice()); + payAmount=payAmount.add(it.getPriceAmount()); + + detailPo.setId(it.getId()); + detailPo.setStatus("refund"); + detailPos.add(detailPo); + + it.setStatus("closed"); + it.setCreateTime(new Date()); + it.setUpdateTime(null); + returnDetail.add(it); + + details.add(new ReturnWTZInfo.ReturnDetail(it.getId()+"",it.getProductSkuId()+"",it.getNum()+"")); + } + } + + + TbOrderInfo newOrderInfo = new TbOrderInfo(orderNo, totalAmount, packAMount, totalAmount, saleAmount, totalAmount, feeAmount, orderInfo.getTableId(), + "table", "return",merchantId, shopId, + "", (byte) 1,day,masterId,"refund",payAmount,orderInfo.getPayType(),orderInfo.getTableName()); + + if("scanCode".equals(payType) || "wx_lite".equals(payType)){ + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(merchantId)); + MsgException.checkNull(thirdApply,"支付参数配置错误"); + ReturnOrderReq req=new ReturnOrderReq(); + req.setAppId(thirdApply.getAppId()); + req.setTimestamp(System.currentTimeMillis()); + req.setOrderNumber(orderInfo.getPayOrderNo()); + req.setAmount(String.format("%.2f",newOrderInfo.getPayAmount().setScale(2,BigDecimal.ROUND_DOWN))); + req.setMercRefundNo(orderInfo.getOrderNo()); + req.setRefundReason("退货"); + req.setPayPassword(thirdApply.getPayPassword()); + Map map= BeanUtil.transBean2Map(req); + req.setSign(MD5Util.encrypt(map,thirdApply.getAppToken(),true)); + log.info("merchantOrderReturn req:{}", JSONUtil.toJsonStr(req)); + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/returnOrder"),req,String.class); + log.info("merchantOrderReturn:{}",response.getBody()); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())){ + JSONObject object=JSONObject.parseObject(response.getBody()); + if(!object.get("code").equals("0")){ + MsgException.check(true,"退款渠道调用失败"); + } +// newOrderInfo.setPayOrderNo(object.getJSONObject("data").getString("refundOrderNumber")); + } + } + + + //判断是否修改主单状态 + BigDecimal returnAmount= tbOrderDetailMapper.selectByOrderId(orderId.toString()); + if(N.egt(returnAmount.add(payAmount),orderAmount)){ + orderInfo.setStatus("refund"); + } + + + orderInfo.setRemark(remark); + orderInfo.setUpdatedAt(System.currentTimeMillis()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + //添加退单数据 + newOrderInfo.setSource(orderId); + tbOrderInfoMapper.insert(newOrderInfo); + + //更新子单表 + if(ObjectUtil.isNotEmpty(detailPos)&&detailPos.size()>0){ + tbOrderDetailMapper.updateBatchOrderDetail(detailPos); + } + + //添加子表信息 + if(ObjectUtil.isNotEmpty(returnDetail)&&returnDetail.size()>0){ + tbOrderDetailMapper.batchInsert(returnDetail,newOrderInfo.getId().toString()); + } + + + + JSONObject jsonObject=new JSONObject(); + jsonObject.put("token",token); + jsonObject.put("type","return"); + jsonObject.put("orderId",0); + jsonObject.put("amount",newOrderInfo.getPayAmount()); +// jsonObject.put("data",new ReturnWTZInfo(orderId+"",newOrderInfo.getPayAmount(),details)); + producer.putOrderCollect(jsonObject.toJSONString()); + + + + producer.printMechine(newOrderInfo.getId()+""); + + return Result.success(CodeEnum.SUCCESS); + } + + + + + public String generateReturnOrderNumber() { + String date = DateUtils.getSdfTimes(); + Random random = new Random(); + int randomNum = random.nextInt(900) + 100; + return "RO" + date + randomNum; + } + + + public static void main(String[] args){ + + System.out.println(String.format("%.2f",new BigDecimal(1).setScale(2,BigDecimal.ROUND_DOWN))); + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java new file mode 100644 index 0000000..fcc94d6 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -0,0 +1,88 @@ +package com.chaozhanggui.system.cashierservice.service; + +import cn.hutool.core.util.ObjectUtil; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Service +@Slf4j +public class ProductService { + + + @Autowired + TbProductMapper tbProductMapper; + + @Autowired + TbShopCategoryMapper tbShopCategoryMapper; + + @Autowired + TbProductSpecMapper tbProductSpecMapper; + + + @Autowired + TbProductSkuMapper tbProductSkuMapper; + + @Autowired + TbProductSkuResultMapper tbProductSkuResultMapper; + + + public Result queryCategory(String shopId,Integer page,Integer pageSize){ + PageHelper.startPage(page, pageSize); + List list=tbShopCategoryMapper.selectByAll(shopId); + PageInfo pageInfo=new PageInfo(list); + return Result.success(CodeEnum.SUCCESS,pageInfo); + } + + + public Result queryCommodityInfo(String shopId, String categoryId, String commdityName, Integer page, Integer pageSize, String masterId){ + List tbProductWithBLOBs=null; + if(ObjectUtil.isEmpty(categoryId)){ + PageHelper.startPage(page, pageSize); + tbProductWithBLOBs=tbProductMapper.selectByShopId(shopId,commdityName); + }else { + PageHelper.startPage(page, pageSize); + tbProductWithBLOBs=tbProductMapper.selectByShopIdAndShopType(shopId,categoryId,commdityName); + } + + if(ObjectUtil.isNotEmpty(tbProductWithBLOBs)){ + tbProductWithBLOBs.parallelStream().forEach(it->{ + Integer orderCount=tbProductMapper.countOrderByshopIdAndProductId(it.getShopId(),it.getId().toString(),masterId); + it.setOrderCount((ObjectUtil.isNull(orderCount)||ObjectUtil.isEmpty(orderCount))?0:orderCount); + TbProductSpec tbProductSpec= tbProductSpecMapper.selectByPrimaryKey(it.getSpecId()); + if(ObjectUtil.isEmpty(tbProductSpec)){ + tbProductSpec=new TbProductSpec(); + } + it.setTbProductSpec(tbProductSpec); + + TbProductSkuResult skuResult=tbProductSkuResultMapper.selectByPrimaryKey(it.getId()); + if(ObjectUtil.isEmpty(skuResult)){ + skuResult=new TbProductSkuResult(); + } + it.setProductSkuResult(skuResult); + }); + } + + return Result.success(CodeEnum.SUCCESS,tbProductWithBLOBs); + } + + + public Result queryProductSku(String shopId, String productId, String spec_tag){ + if(ObjectUtil.isEmpty(shopId)||ObjectUtil.isEmpty(productId)){ + return Result.fail(CodeEnum.PARAM); + } + + TbProductSkuWithBLOBs tbProductSkuWithBLOBs= tbProductSkuMapper.selectByShopIdAndProductIdAndSpec(shopId,productId,spec_tag); + return Result.success(CodeEnum.SUCCESS,tbProductSkuWithBLOBs); + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java new file mode 100644 index 0000000..b92ecd8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java @@ -0,0 +1,89 @@ +package com.chaozhanggui.system.cashierservice.service; + +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.*; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.TokenUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.*; + +@Service +public class ShopInfoService { + + + + @Autowired + TbShopAreaMapper tbShopAreaMapper; + + @Autowired + TbShopTableMapper tbShopTableMapper; + @Autowired + TbTokenMapper tbTokenMapper; + @Autowired + ShopUserDutyMapper shopUserDutyMapper; + @Autowired + ShopUserDutyDetailMapper shopUserDutyDetailMapper; + + public Result queryShopArea(String shopId){ + List list= tbShopAreaMapper.selectByShopId(shopId); + return Result.success(CodeEnum.SUCCESS,list); + } + + + public Result queryShopTable(String shopId,String areaId,String status,int page,int pageSize){ + if(ObjectUtil.isEmpty(shopId)){ + return Result.fail(CodeEnum.PARAM); + } + + PageHelper.startPage(page, pageSize); + List shopTables=tbShopTableMapper.selectByShopIdAndStatus(shopId,areaId,status); + PageInfo pageInfo=new PageInfo(shopTables); + return Result.success(CodeEnum.SUCCESS,pageInfo); + } + + + public Result queryDuty(String token, int page, int pageSize) { + TbToken tbToken = tbTokenMapper.selectByToken(token); + if (Objects.isNull(tbToken)){ + return Result.fail(CodeEnum.PARAM); + } + ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByTokenId(tbToken.getId()); + if (Objects.nonNull(shopUserDuty)){ +// PageHelper.startPage(page, pageSize); + List shopTables=shopUserDutyDetailMapper.selectAllByDuctId(shopUserDuty.getId()); +// PageInfo pageInfo=new PageInfo(shopTables); + shopUserDuty.setDetailList(shopTables); + if (Objects.isNull(shopUserDuty.getLoginOutTime())){ + shopUserDuty.setLoginOutTime(new Date()); + } + return Result.success(CodeEnum.SUCCESS,shopUserDuty); + }else { + PageInfo pageInfo=new PageInfo(new ArrayList()); + return Result.success(CodeEnum.SUCCESS,pageInfo); + } + + } + + public Result queryDutyFlow(String token, String shopId, int page, int pageSize) { +// JSONObject jsonObject = TokenUtil.parseParamFromToken(token); +// String userId = jsonObject.getString("accountId"); + PageHelper.startPage(page, pageSize); + PageHelper.orderBy("login_out_time desc"); + List list = shopUserDutyMapper.selectByShopId(shopId); + PageInfo pageInfo=new PageInfo(list); + Map map = new HashMap<>(); + map.put("pageInfo",pageInfo); + map.put("total",pageInfo.getTotal()); + BigDecimal amount = shopUserDutyMapper.selectSumAmount(shopId); + map.put("amount",amount); + return Result.success(CodeEnum.SUCCESS,map); + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/sign/CodeEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/sign/CodeEnum.java new file mode 100644 index 0000000..86b5590 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/sign/CodeEnum.java @@ -0,0 +1,122 @@ +package com.chaozhanggui.system.cashierservice.sign; + +public enum CodeEnum { + + //系统编码 + SYS_EXCEPTION("999",false,"系统异常","fail"), + SUCCESS("0",false,"成功","success"), + ENCRYPT("0",true,"成功","success"), + FAIL("1",false,"失败","fail"), + + PARAM("100001",false,"请求参数不允许为空","fail"), + SERIALNUMBER("100002",false,"请求序列号不允许为空","fail"), + + CLIENTTYPE("100003",false,"请求客户端类型不允许为空","fail"), + + LOGINNAME("100004",false,"登录账号不允许为空","fail"), + PASSWORD("100005",false,"密码不允许为空","fail"), + + + ACCOUNTEIXST("100006",false,"账号不存在","fail"), + PASSWORDERROR("100007",false,"用户名密码不一致","fail"), + + USERHAVEDLOGIN("100008",false,"已有用户登录","fail"), + + + TOKENTERROR("100009",false,"错误的token","fail"), + + USERNOLOGIN("100010",false,"用户未登录","fail"), + SHOPINFONOEXIST("100011",false,"店铺信息不存在或已停止营业","fail"), + + PRODUCTINFOERROR("100012",false,"商品信息异常","fail"), + + PRODUCTSKUERROR("100013",false,"商品规格信息异常","fail"), + + ORDERNOEXIST("100014",false,"订单信息不存在","fail"), + + + ORDERSTATUSERROR("100015",false,"订单状态异常","fail"), + + NOCUSTOMER("100016",false,"没有对应的支付信息","fail"), + + + MEMBERHAVED("100017",false,"会员已存在","fail"), + + MEMBERNOEXIST("100018",false,"会员不存在","fail"), + + PAYTYPENOEXIST("100019",false,"支付方式不存在","fail"), + NUMBER("100014",false,"添加数量不允许小于零","fail"), + CREATEORDER("100020",false,"暂无可挂起订单","fail"), + CARTSPEC("100021",false,"购物车商品不存在","fail"), + CARTJH("100022",false,"暂无可激活的订单","fail"), + + PAYING("100015",true,"用户支付中","fail"), + MEMBERINSUFFICIENTFUNDS("100016",true,"会员资金不足","fail"), + PRINTMACHINENOEXSIT("100017",true,"此店铺未配置打印机","fail"), + + MERCHANTEIXST("100018",false,"商户号信息不存在","fail"), + ORDERCREATE("100023",false,"存在支付中订单,请稍后","fail"), + + + printmachinenoexsit("100019",false,"打印设备不存在","fail"), + + + + + + + + + + + + TOENNOEXIST("9999",false,"token失效","fail"), + + + + + + + + + + + + + + + + + ; + + private String code; + + private String msg; + + private Boolean encrypt; + + private String icon; + + CodeEnum(String code,Boolean encrypt, String msg,String icon) { + this.code = code; + this.encrypt = encrypt; + this.msg = msg; + this.icon = icon; + } + + public String getIcon() { + return icon; + } + + public String getCode() { + return code; + } + + public String getMsg() { + return msg; + } + + public Boolean getEncrypt() { + return encrypt; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/sign/Result.java b/src/main/java/com/chaozhanggui/system/cashierservice/sign/Result.java new file mode 100644 index 0000000..2d76ecf --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/sign/Result.java @@ -0,0 +1,154 @@ +package com.chaozhanggui.system.cashierservice.sign; + +import cn.hutool.json.JSONUtil; +import com.chaozhanggui.system.cashierservice.util.DESUtil; + +public class Result { + + /** + * 结果详细 + */ + private String msg; + + /** + * 需要传回页面的数据 + */ + private Object data; + + /** + * 状态码 + */ + private String code; + + /** + * 加密 + */ + private boolean encrypt; + + /** + * 图标 + */ + private String icon; + + public boolean isEncrypt() { + return encrypt; + } + + public void setEncrypt(boolean encrypt) { + this.encrypt = encrypt; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public Result() { + + } + + public Result(CodeEnum enums) { + this.msg = enums.getMsg(); + this.encrypt = enums.getEncrypt(); + this.code = enums.getCode(); + this.icon = enums.getIcon(); + } + + public Result(CodeEnum enums,Object data) { + this.msg = enums.getMsg(); + this.encrypt = enums.getEncrypt(); + this.code = enums.getCode(); + this.icon=enums.getIcon(); + if(enums.getEncrypt()){ + this.data= DESUtil.encode(JSONUtil.toJsonStr(data)); + }else{ + this.data=data; + } + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public static Result success(CodeEnum enums) { + Result dto = new Result(); + dto.setMsg(enums.getMsg()); + dto.setEncrypt(enums.getEncrypt()); + dto.setCode(enums.getCode()); + dto.setIcon(enums.getIcon()); + return dto; + } + + public static Result success(CodeEnum enums,Object data) { + Result dto = new Result(); + dto.setData(data); + dto.setMsg(enums.getMsg()); + dto.setEncrypt(enums.getEncrypt()); + dto.setCode(enums.getCode()); + dto.setIcon(enums.getIcon()); + if(enums.getEncrypt()){ + dto.setData(DESUtil.encode(JSONUtil.toJsonStr(data))); + }else{ + dto.setData(data); + } + return dto; + } + + + public static Result success(CodeEnum enums,String msg,Object data) { + Result dto = new Result(); + dto.setData(data); + dto.setEncrypt(enums.getEncrypt()); + dto.setCode(enums.getCode()); + dto.setIcon(enums.getIcon()); + if(enums.getEncrypt()){ + dto.setData(DESUtil.encode(JSONUtil.toJsonStr(data))); + }else{ + dto.setData(data); + } + dto.setMsg(msg); + return dto; + } + + public static Result fail(CodeEnum codeEnum) { + Result dto = new Result(); + dto.setMsg(codeEnum.getMsg()); + dto.setEncrypt(false); + dto.setCode(codeEnum.getCode()); + dto.setIcon(CodeEnum.FAIL.getIcon()); + return dto; + } + + + public static Result fail(String msg) { + Result dto = new Result(); + dto.setMsg(msg); + dto.setEncrypt(false); + dto.setCode(CodeEnum.FAIL.getCode()); + dto.setIcon(CodeEnum.FAIL.getIcon()); + return dto; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/sign/SginAnot.java b/src/main/java/com/chaozhanggui/system/cashierservice/sign/SginAnot.java new file mode 100644 index 0000000..eef987e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/sign/SginAnot.java @@ -0,0 +1,14 @@ +package com.chaozhanggui.system.cashierservice.sign; + + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SginAnot { + + SignEnum type() default SignEnum.ANY;//默认不需要签名 +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/sign/SignEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/sign/SignEnum.java new file mode 100644 index 0000000..c0bd0e9 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/sign/SignEnum.java @@ -0,0 +1,16 @@ +package com.chaozhanggui.system.cashierservice.sign; + +public enum SignEnum { + + //0不需要签名,1使用MD5数据加密 2 使用SHA数据加密 3 RSA 加密 + ANY(0), MD5(1), SHA1(2),RSA(3); + private final int value; + + private SignEnum(int value) { + this.value = value; + } + + public int getValue() { + return value; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/task/OrderTask.java b/src/main/java/com/chaozhanggui/system/cashierservice/task/OrderTask.java new file mode 100644 index 0000000..82af228 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/task/OrderTask.java @@ -0,0 +1,135 @@ +package com.chaozhanggui.system.cashierservice.task; + +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import com.chaozhanggui.system.cashierservice.dao.*; +import com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply; +import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo; +import com.chaozhanggui.system.cashierservice.entity.TbOrderPayment; +import com.chaozhanggui.system.cashierservice.model.TradeQueryReq; +import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer; +import com.chaozhanggui.system.cashierservice.sign.CodeEnum; +import com.chaozhanggui.system.cashierservice.sign.Result; +import com.chaozhanggui.system.cashierservice.util.BeanUtil; +import com.chaozhanggui.system.cashierservice.util.MD5Util; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.client.RestTemplate; + +import java.util.List; +import java.util.Map; + +@Component +@Slf4j +public class OrderTask { + + + @Autowired + TbOrderInfoMapper tbOrderInfoMapper; + @Autowired + TbCashierCartMapper tbCashierCartMapper; + + @Autowired + TbMerchantThirdApplyMapper tbMerchantThirdApplyMapper; + + @Autowired + TbOrderPaymentMapper tbOrderPaymentMapper; + + + @Autowired + TbOrderDetailMapper tbOrderDetailMapper; + + @Autowired + RabbitProducer producer; + + + @Autowired + RestTemplate restTemplate; + + + @Value("${gateway.url}") + private String gateWayUrl; + +// @Scheduled(initialDelay = 1000,fixedDelay = 1000) + public void orderQuery(){ + + List list= tbOrderInfoMapper.selectAllByStatus("paying"); + if(ObjectUtil.isNotEmpty(list)&&list.size()>0){ + for (TbOrderInfo orderInfo : list) { + deal(orderInfo); + } + } + + } + + @Transactional(rollbackFor = Exception.class) + public void deal(TbOrderInfo orderInfo){ + + + TbMerchantThirdApply thirdApply= tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getMerchantId())); + if(ObjectUtil.isEmpty(thirdApply)||ObjectUtil.isNull(thirdApply)){ + log.info(CodeEnum.NOCUSTOMER.getMsg()); + return ; + } + + TbOrderPayment tbOrderPayment=tbOrderPaymentMapper.selectByOrderId(orderInfo.getId().toString()); + if(ObjectUtil.isNotEmpty(tbOrderPayment)){ + TradeQueryReq tradeQueryReq=new TradeQueryReq(); + tradeQueryReq.setAppId(thirdApply.getAppId()); + tradeQueryReq.setTimestamp(System.currentTimeMillis()); + tradeQueryReq.setOrderNumber(tbOrderPayment.getTradeNumber()); + + Map map= BeanUtil.transBean2Map(tradeQueryReq); + tradeQueryReq.setSign(MD5Util.encrypt(map,thirdApply.getAppToken(),true)); + ResponseEntity response= restTemplate.postForEntity(gateWayUrl.concat("merchantOrder/tradeQuery"),tradeQueryReq,String.class); + if(response.getStatusCodeValue()==200&&ObjectUtil.isNotEmpty(response.getBody())){ + JSONObject object=JSONObject.parseObject(response.getBody()); + if(object.get("code").equals("0")){ + + JSONObject data=object.getJSONObject("data"); + if("1".equals(data.getString("status"))){ + + orderInfo.setStatus("closed"); + orderInfo.setPayOrderNo(tbOrderPayment.getTradeNumber()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderInfo.getId().toString(),"final"); + log.info("更新购物车:{}",cartCount); + + tbOrderDetailMapper.updateStatusByOrderIdAndStatus(orderInfo.getId(),"closed"); + + +// JSONObject jsonObject=new JSONObject(); +// jsonObject.put("token",token); +// jsonObject.put("type","create"); +// jsonObject.put("orderId",orderId); +// +// producer.putOrderCollect(jsonObject.toJSONString()); +// +// producer.printMechine(orderId); + + + + + }else if ("0".equals(data.getString("status"))){ + orderInfo.setStatus("fail"); + orderInfo.setPayOrderNo(tbOrderPayment.getTradeNumber()); + tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + + //更新购物车状态 + int cartCount= tbCashierCartMapper.updateByOrderId(orderInfo.getId().toString(),"fail"); + log.info("更新购物车:{}",cartCount); + } + }else { + + } + } + } + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/task/ShopInfoStatusTask.java b/src/main/java/com/chaozhanggui/system/cashierservice/task/ShopInfoStatusTask.java new file mode 100644 index 0000000..e9ac24f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/task/ShopInfoStatusTask.java @@ -0,0 +1,101 @@ +package com.chaozhanggui.system.cashierservice.task; + +import cn.hutool.core.util.ObjectUtil; +import com.chaozhanggui.system.cashierservice.cache.DataCache; +import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper; +import com.chaozhanggui.system.cashierservice.dao.TbShopOnlineMapper; +import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; +import com.chaozhanggui.system.cashierservice.entity.TbShopOnline; +import com.chaozhanggui.system.cashierservice.util.DateUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.Enumeration; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; + +@Component +@Slf4j +public class ShopInfoStatusTask { + + + @Autowired + TbShopInfoMapper tbShopInfoMapper; + + + @Autowired + TbShopOnlineMapper tbShopOnlineMapper; + + +// @Scheduled(initialDelay = 2000,fixedDelay = 500) + public void modifyShopStatus(){ + ConcurrentHashMap concurrentHashMap= DataCache.concurrentHashMap; + + Enumeration keys= concurrentHashMap.keys(); + while (keys.hasMoreElements()) { + String key = keys.nextElement(); + TbShopInfo shopInfo = concurrentHashMap.get(key); + if (shopInfo.getBusinessTime() == null || ObjectUtil.isEmpty(shopInfo.getBusinessTime())) { + shopInfo.setOnSale(Byte.parseByte("0")); + shopInfo.setStatus(Byte.parseByte("0")); + shopInfo.setUpdatedAt(System.currentTimeMillis()); + tbShopInfoMapper.updateByPrimaryKeyWithBLOBs(shopInfo); + continue; + } + + try { + deal(shopInfo); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + @Transactional(rollbackFor = Exception.class) + public void deal(TbShopInfo shopInfo) throws Exception{ + TbShopOnline online= tbShopOnlineMapper.selectByPrimaryKey(shopInfo.getId()); + if(Objects.isNull(online)||ObjectUtil.isEmpty(online)){ + log.error("店铺信息不存在:{}",shopInfo.getId()); + return; + } + + + switch (shopInfo.getOnSale().toString()){ + case "0": + if(new Date().compareTo(online.getStartTime())>0&&online.getEndTime().compareTo(new Date())>0){ + shopInfo.setOnSale(Byte.parseByte("1")); + shopInfo.setStatus(Byte.parseByte("1")); + shopInfo.setCreatedAt(System.currentTimeMillis()); + tbShopInfoMapper.updateByPrimaryKey(shopInfo); + + + online.setStatus("1"); + online.setUpdateTime(new Date()); + tbShopOnlineMapper.updateByPrimaryKey(online); + DataCache.concurrentHashMap.put(shopInfo.getId().toString(),shopInfo); + } + break; + case "1": + if(online.getStartTime().compareTo(new Date())>0||new Date().compareTo(online.getEndTime())>0){ + shopInfo.setOnSale(Byte.parseByte("1")); + shopInfo.setStatus(Byte.parseByte("1")); + shopInfo.setCreatedAt(System.currentTimeMillis()); + tbShopInfoMapper.updateByPrimaryKey(shopInfo); + + online.setStartTime(DateUtils.getNewDate(online.getStartTime(),3,1)); + online.setEndTime(DateUtils.getNewDate(online.getEndTime(),3,1)); + online.setStatus("0"); + online.setUpdateTime(new Date()); + tbShopOnlineMapper.updateByPrimaryKey(online); + } + break; + } + + } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/AESUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/AESUtil.java new file mode 100644 index 0000000..a8dcdc3 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/AESUtil.java @@ -0,0 +1,62 @@ +package com.chaozhanggui.system.cashierservice.util; + +import javax.crypto.Cipher; +import javax.crypto.spec.SecretKeySpec; +import java.util.Arrays; +import java.util.Base64; + +public class AESUtil { + + + /** + * AES算法加密 + * @Param:text原文 + * @Param:key密钥 + * */ + public static String aesEncrypt(String text,String key) throws Exception { + // 创建AES加密算法实例(根据传入指定的秘钥进行加密) + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + SecretKeySpec keySpec = new SecretKeySpec(key.getBytes(), "AES"); + + // 初始化为加密模式,并将密钥注入到算法中 + cipher.init(Cipher.ENCRYPT_MODE, keySpec); + + // 将传入的文本加密 + byte[] encrypted = cipher.doFinal(text.getBytes()); + + //生成密文 + // 将密文进行Base64编码,方便传输 + System.out.println("加密后的字节数组:"+ Arrays.toString(encrypted)); + return Base64.getEncoder().encodeToString(encrypted); + } + + /** + * AES算法解密 + * @Param:base64Encrypted密文 + * @Param:key密钥 (需要使用长度为16、24或32的字节数组作为AES算法的密钥,否则就会遇到java.security.InvalidKeyException异常) + * + * */ + public static String aesDecrypt(String base64Encrypted,String key)throws Exception{ + // 创建AES解密算法实例 + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + SecretKeySpec keySpec = new SecretKeySpec(key.getBytes(), "AES"); + + // 初始化为解密模式,并将密钥注入到算法中 + cipher.init(Cipher.DECRYPT_MODE, keySpec); + + // 将Base64编码的密文解码 + byte[] encrypted = Base64.getDecoder().decode(base64Encrypted); + + // 解密 + byte[] decrypted = cipher.doFinal(encrypted); + return new String(decrypted); + } + + + public static void main(String[] args) throws Exception { + String encData= aesEncrypt("张少清","202311210926ojbk"); + System.out.println("加密后的数据:"+encData); + System.out.println("解密数据:"+aesDecrypt(encData,"202311210926ojbk")); + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/BeanUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/BeanUtil.java new file mode 100644 index 0000000..c50a17e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/BeanUtil.java @@ -0,0 +1,205 @@ +package com.chaozhanggui.system.cashierservice.util; + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.beanutils.PropertyUtilsBean; +import org.apache.commons.lang3.StringUtils; + +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.*; +import java.util.Map.Entry; + +public class BeanUtil { + + // Map --> Bean 2: 利用org.apache.commons.beanutils 工具类实现 Map --> Bean + public static void transMap2Bean2(Map map, Object obj) { + if (map == null || obj == null) { + return; + } + try { + BeanUtils.populate(obj, map); + } catch (Exception e) { + System.out.println("transMap2Bean2 Error " + e); + } + } + + // Map --> Bean 1: 利用Introspector,PropertyDescriptor实现 Map --> Bean + public static void transMap2Bean(Map map, Object obj) { + try { + BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); + PropertyDescriptor[] propertyDescriptors = beanInfo + .getPropertyDescriptors(); + + for (PropertyDescriptor property : propertyDescriptors) { + String key = property.getName(); + + if (map.containsKey(key)) { + Object value = map.get(key); + // 得到property对应的setter方法 + Method setter = property.getWriteMethod(); + setter.invoke(obj, value); + } + + } + + } catch (Exception e) { + System.out.println("transMap2Bean Error " + e); + } + + return; + + } + + // Bean --> Map 1: 利用Introspector和PropertyDescriptor 将Bean --> Map + public static Map transBean2Map(Object obj) { + if (obj == null) { + return null; + } + Map map = new HashMap(); + try { + BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); + PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); + for (PropertyDescriptor property : propertyDescriptors) { + String key = property.getName(); + + // 过滤class属性 + if (!key.equals("class")) { + // 得到property对应的getter方法 + Method getter = property.getReadMethod(); + Object value = getter.invoke(obj); + if(null !=value && !"".equals(value)) + map.put(key, value); + } + + } + } catch (Exception e) { + System.out.println("transBean2Map Error " + e); + } + return map; + + } + + + + + + public static LinkedHashMap transBeanMap(Object obj) { + if (obj == null) { + return null; + } + LinkedHashMap map = new LinkedHashMap(); + try { + BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); + PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); + for (PropertyDescriptor property : propertyDescriptors) { + String key = property.getName(); + + // 过滤class属性 + if (!key.equals("class")) { + // 得到property对应的getter方法 + Method getter = property.getReadMethod(); + Object value = getter.invoke(obj); + if(null !=value && !"".equals(value)) + map.put(key, value); + } + + } + } catch (Exception e) { + System.out.println("transBean2Map Error " + e); + } + return map; + + } + + public static String mapOrderStr(Map map) { + List> list = new ArrayList>(map.entrySet()); + Collections.sort(list, new Comparator>() { + public int compare(Entry o1, Entry o2) { + return o1.getKey().compareTo(o2.getKey()); + } + }); + + StringBuilder sb = new StringBuilder(); + for (Entry mapping : list) { + sb.append(mapping.getKey() + "=" + mapping.getValue() + "&"); + } + return sb.substring(0, sb.length() - 1); + } + + /** + * + * 将源的属性复制到目标属性上去 + * @param src + * @param dest + * @lastModified + * @history + */ + public static void copyProperties(Object dest,Object src) { + if (src == null || dest == null) { + return; + } + // 获取所有的get/set 方法对应的属性 + PropertyUtilsBean propertyUtilsBean = new PropertyUtilsBean(); + PropertyDescriptor[] descriptors = propertyUtilsBean.getPropertyDescriptors(src); + + for (int i = 0; i < descriptors.length; i++) { + PropertyDescriptor propItem = descriptors[i]; + // 过滤setclass/getclass属性 + if ("class".equals(propItem.getName())) { + continue; + } + + try { + Method method = propItem.getReadMethod(); + // 通过get方法获取对应的值 + Object val = method.invoke(src); + // 如果是空,不做处理 + if (null == val) { + continue; + } + if(val instanceof String) { + if(StringUtils.isBlank(val.toString())) { + continue; + } + } + // 值复制 + PropertyDescriptor prop = propertyUtilsBean.getPropertyDescriptor(dest, propItem.getName()); + // 调用写方法,设置值 + if (null != prop && prop.getWriteMethod() != null) { + prop.getWriteMethod().invoke(dest, val); + } + } catch (Exception e) { + } + + } + + } + + public static T mapToEntity(Map map, Class entity) { + T t = null; + try { + t = entity.newInstance(); + for(Field field : entity.getDeclaredFields()) { + if (map.containsKey(field.getName())) { + boolean flag = field.isAccessible(); + field.setAccessible(true); + Object object = map.get(field.getName()); + if (object!= null && field.getType().isAssignableFrom(object.getClass())) { + field.set(t, object); + } + field.setAccessible(flag); + } + } + return t; + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + return t; + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/DESUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/DESUtil.java new file mode 100644 index 0000000..1eb651e --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/DESUtil.java @@ -0,0 +1,73 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.core.codec.Base64; + +import java.security.Key; + +import javax.crypto.Cipher; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.DESedeKeySpec; +import javax.crypto.spec.IvParameterSpec; + + +public class DESUtil { + + private final static String secretKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwN6xgd6Ad8v2hIIsQVnbt8a3JituR8o4Tc3B5WlcFR55bz4OMqrG/356Ur3cPbc2Fe8ArNd/0gZbC9q56Eb16JTkVNA/fye4SXznWxdyBPR7+guuJZHc/VW2fKH2lfZ2P3Tt0QkKZZoawYOGSMdIvO+WqK44updyax0ikK6JlNQIDAQAB"; + // 向量 + private final static String iv = "ggboy123"; + // 加解密统一使用的编码方式 + private final static String encoding = "utf-8"; + + /** + * @Title: encode + * @Description: TODO(加密) + * @param plainText + * @author gangyu2 + * @date 2018年11月20日下午1:19:19 + */ + public static String encode(String plainText){ + Key deskey = null; + DESedeKeySpec spec; + try { + spec = new DESedeKeySpec(secretKey.getBytes()); + SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede"); + deskey = keyfactory.generateSecret(spec); + + Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding"); + IvParameterSpec ips = new IvParameterSpec(iv.getBytes()); + cipher.init(Cipher.ENCRYPT_MODE, deskey, ips); + byte[] encryptData = cipher.doFinal(plainText.getBytes(encoding)); + return Base64.encode(encryptData); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + /** + * @Title: decode + * @Description: TODO(解密) + * @param encryptText + * @author gangyu2 + * @date 2018年11月20日下午1:19:37 + */ + public static String decode(String encryptText){ + try{ + + Key deskey = null; + DESedeKeySpec spec = new DESedeKeySpec(secretKey.getBytes()); + SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede"); + deskey = keyfactory.generateSecret(spec); + Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding"); + IvParameterSpec ips = new IvParameterSpec(iv.getBytes()); + cipher.init(Cipher.DECRYPT_MODE, deskey, ips); + + byte[] decryptData = cipher.doFinal(Base64.decode(encryptText)); + + return new String(decryptData, encoding); + }catch(Exception e){ + e.printStackTrace(); + return ""; + } + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/DateUtils.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/DateUtils.java new file mode 100644 index 0000000..b394b44 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/DateUtils.java @@ -0,0 +1,354 @@ +package com.chaozhanggui.system.cashierservice.util; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * Created by SEELE on 2018/4/19. + */ +public class DateUtils { + + private final static SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy"); + private final static SimpleDateFormat sdfDay = new SimpleDateFormat("yyyy-MM-dd"); + private final static SimpleDateFormat sdfDays = new SimpleDateFormat("yyyyMMdd"); + private final static SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private final static SimpleDateFormat sdfTimeSS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + private final static SimpleDateFormat sdfTimes = new SimpleDateFormat("yyyyMMddHHmmss"); + + + + + private final static SimpleDateFormat sdfday = new SimpleDateFormat("MM-dd HH:mm"); + + + public static Date getNewDate(Date date, Integer type, Integer interval) throws ParseException { + Calendar c = Calendar.getInstance(); + c.setTime(date); + switch (type) { + case 1: + c.set(Calendar.YEAR, (c.get(Calendar.YEAR) + interval)); + break; + case 2: + c.set(Calendar.MONTH, (c.get(Calendar.MONTH) + interval)); + break; + case 3: + c.set(Calendar.DATE, (c.get(Calendar.DATE) + interval)); + break; + case 4: + c.set(Calendar.HOUR, (c.get(Calendar.HOUR) + interval)); + break; + case 5: + c.set(Calendar.MINUTE, (c.get(Calendar.MINUTE) + interval)); + break; + default: + c.set(Calendar.SECOND, (c.get(Calendar.SECOND) + interval)); + break; + } + Date newDate = c.getTime(); + return sdfTime.parse(sdfTime.format(newDate)); + } + + + /** + * 获取YYYY格式 + * @return + */ + public static String getSdfTimes() { + return sdfTimes.format(new Date()); + } + + + public static String getNextSdfTimes(Date date){ + return sdfTimes.format(date); + } + + + + public static String getTimes(Date date){ + return sdfday.format(date); + } + + + /** + * 获取YYYY格式 + * @return + */ + public static String getYear() { + return sdfYear.format(new Date()); + } + + /** + * 获取YYYY-MM-DD格式 + * @return + */ + public static String getDay() { + return sdfDay.format(new Date()); + } + + /** + * 获取YYYYMMDD格式 + * @return + */ + public static String getDays(){ + return sdfDays.format(new Date()); + } + + /** + * 获取YYYY-MM-DD HH:mm:ss格式 + * @return + */ + public static String getTime(Date date) { + return sdfTime.format(date); + } + + /** + * @Title: compareDate + * @Description: TODO(日期比较,如果s>=e 返回true 否则返回false) + * @param s + * @param e + * @return boolean + * @throws + * @author fh + */ + public static boolean compareDate(String s, String e) { + if(fomatDate(s)==null||fomatDate(e)==null){ + return false; + } + return fomatDate(s).getTime() >=fomatDate(e).getTime(); + } + + /** + * 格式化日期 + * @return + */ + public static Date fomatDate(String date) { + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + try { + return fmt.parse(date); + } catch (ParseException e) { + e.printStackTrace(); + return null; + } + } + + /** + * 校验日期是否合法 + * @return + */ + public static boolean isValidDate(String s) { + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + try { + fmt.parse(s); + return true; + } catch (Exception e) { + // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对 + return false; + } + } + + /** + * @param startTime + * @param endTime + * @return + */ + public static int getDiffYear(String startTime,String endTime) { + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + try { + //long aa=0; + int years=(int) (((fmt.parse(endTime).getTime()-fmt.parse(startTime).getTime())/ (1000 * 60 * 60 * 24))/365); + return years; + } catch (Exception e) { + // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对 + return 0; + } + } + + /** + *
  • 功能描述:时间相减得到天数 + * @param beginDateStr + * @param endDateStr + * @return + * long + * @author Administrator + */ + public static long getDaySub(String beginDateStr,String endDateStr){ + long day=0; + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + Date beginDate = null; + Date endDate = null; + + try { + beginDate = format.parse(beginDateStr); + endDate= format.parse(endDateStr); + } catch (ParseException e) { + e.printStackTrace(); + } + day=(endDate.getTime()-beginDate.getTime())/(24*60*60*1000); + //System.out.println("相隔的天数="+day); + + return day; + } + + /** + * 得到n天之后的日期 + * @param days + * @return + */ + public static String getAfterDayDate(String days) { + int daysInt = Integer.parseInt(days); + + Calendar canlendar = Calendar.getInstance(); // java.util包 + canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动 + Date date = canlendar.getTime(); + + SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateStr = sdfd.format(date); + + return dateStr; + } + /** + * 得到n天之后的日期 + * @param days + * @return + */ + public static String getAfterDate(Date openDate,String days) { + int daysInt = Integer.parseInt(days); + + Calendar canlendar = Calendar.getInstance(); // java.util包 + canlendar.setTime(openDate); + canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动 + Date date = canlendar.getTime(); + SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateStr = sdfd.format(date); + return dateStr; + } + public static String getAfterDate1(Date openDate,String year) { + int daysInt = Integer.parseInt(year); + + Calendar canlendar = Calendar.getInstance(); // java.util包 + canlendar.setTime(openDate); + canlendar.add(Calendar.YEAR, daysInt); // 日期减 如果不够减会将月变动 + Date date = canlendar.getTime(); + SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateStr = sdfd.format(date); + return dateStr; + } + public static Date getAfterDateStr(Date openDate,String days) { + int daysInt = Integer.parseInt(days); + + Calendar canlendar = Calendar.getInstance(); // java.util包 + canlendar.setTime(openDate); + canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动 + Date date = canlendar.getTime(); + return date; + } + + /** + * 得到n天之后是周几 + * @param days + * @return + */ + public static String getAfterDayWeek(String days) { + int daysInt = Integer.parseInt(days); + Calendar canlendar = Calendar.getInstance(); // java.util包 + canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动 + Date date = canlendar.getTime(); + SimpleDateFormat sdf = new SimpleDateFormat("E"); + String dateStr = sdf.format(date); + return dateStr; + } + + public static void main(String[] args) { + System.out.println(getTimes(new Date())); + } + + /** + * 格式化日期为时分秒 + * @param date + * @return + */ + public static Date fomatDateTime(String date) { + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + return fmt.parse(date); + } catch (ParseException e) { + e.printStackTrace(); + return null; + } + } + + + + public static Date fomatDateTime1(String date) { + DateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmss"); + try { + return fmt.parse(date); + } catch (ParseException e) { + e.printStackTrace(); + return null; + } + } + + + public static java.util.Date parse(String dateString, String dateFormat) { + if ("".equals(dateString.trim()) || dateString == null) { + return null; + } + DateFormat sdf = new SimpleDateFormat(dateFormat); + Date date = null; + try { + date = sdf.parse(dateString); + + } catch (Exception e) { + e.printStackTrace(); + } + + return date; + } + + + private final static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + public static Date convertDate(String date) { + try { + return sdf.parse(date); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + private final static SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + public static Date convertDateByString(String str){ + StringBuilder sb=new StringBuilder(); + sb.append(str.substring(0,4)); + sb.append("-"); + sb.append(str.substring(4,6)); + sb.append("-"); + sb.append(str.substring(6,8)); + sb.append(" "); + sb.append(str.substring(8,10)); + sb.append(":"); + sb.append(str.substring(10,12)); + sb.append(":"); + sb.append(str.substring(12,14)); + + return convertDate1(sb.toString()); + } + + public static Date convertDate1(String date) { + try { + return sdf1.parse(date); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + + public static String formatDateToStr(Date date) { + return sdfTime.format(date); + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/FeieyunPrintUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/FeieyunPrintUtil.java new file mode 100644 index 0000000..80256eb --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/FeieyunPrintUtil.java @@ -0,0 +1,143 @@ +package com.chaozhanggui.system.cashierservice.util; + + +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.http.HttpEntity; +import org.apache.http.NameValuePair; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class FeieyunPrintUtil { + + public static final String URL = "http://api.feieyun.cn/Api/Open/";//不需要修改 + + public static final String USER = "chaozhanggui2022@163.com";//*必填*:账号名 + public static final String UKEY = "UfWkhXxSkeSSscsU";//*必填*: 飞鹅云后台注册账号后生成的UKEY 【备注:这不是填打印机的KEY】 + public static final String SN = "960238952";//*必填*:打印机编号,必须要在管理后台里添加打印机或调用API接口添加之后,才能调用API + + + + public static String printLabelMsg(String sn,String masterId,String productName,Integer number,String date,String money,String remark){ + + StringBuffer sb=new StringBuffer(); + sb.append("1"); + sb.append(""); + sb.append(masterId); + char paddingCharacter = ' '; + sb.append(""); + sb.append(productName); + sb.append(" "); + sb.append(number); + sb.append(""); + sb.append(remark); + + sb.append(""); + sb.append(date); + sb.append(" "); + sb.append("¥"); + sb.append(money); + + String content=sb.toString(); + + //通过POST请求,发送打印信息到服务器 + RequestConfig requestConfig = RequestConfig.custom() + .setSocketTimeout(30000)//读取超时 + .setConnectTimeout(30000)//连接超时 + .build(); + + CloseableHttpClient httpClient = HttpClients.custom() + .setDefaultRequestConfig(requestConfig) + .build(); + + HttpPost post = new HttpPost(URL); + List nvps = new ArrayList(); + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_printLabelMsg"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("sn",sn)); + nvps.add(new BasicNameValuePair("content",content)); + nvps.add(new BasicNameValuePair("times","1"));//打印联数 + + CloseableHttpResponse response = null; + String result = null; + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); + response = httpClient.execute(post); + int statecode = response.getStatusLine().getStatusCode(); + if(statecode == 200){ + HttpEntity httpentity = response.getEntity(); + if (httpentity != null){ + //服务器返回的JSON字符串,建议要当做日志记录起来 + result = EntityUtils.toString(httpentity); + } + } + } + catch (Exception e) + { + e.printStackTrace(); + } + finally{ + try { + if(response!=null){ + response.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + try { + post.abort(); + } catch (Exception e) { + e.printStackTrace(); + } + try { + httpClient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return result; + + } + + + + public static int getProducrName(String str){ + int count = 0; + int digitCount=0; + for (int i=0;i='a' && str.charAt(i)<='z') || (str.charAt(i)>='A' && str.charAt(i)<='Z')){ + count++; + } + + if (Character.isDigit(str.charAt(i))) { + digitCount++; + } + } + return count+digitCount; + } + + private static String signature(String USER,String UKEY,String STIME){ + String s = DigestUtils.sha1Hex(USER+UKEY+STIME); + return s; + } + + + public static void main(String[] args){ + printLabelMsg("960238952","#A9","甜橙马黛茶",5,"03-11 15:21","90","加糖"); + } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/HttpClientUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/HttpClientUtil.java new file mode 100644 index 0000000..f3123d2 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/HttpClientUtil.java @@ -0,0 +1,134 @@ +package com.chaozhanggui.system.cashierservice.util; + +import org.apache.http.NameValuePair; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class HttpClientUtil { + + + public static String doGet(String url, Map param) { + + // 创建Httpclient对象 + CloseableHttpClient httpclient = HttpClients.createDefault(); + + String resultString = ""; + CloseableHttpResponse response = null; + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); + + // 执行请求 + response = httpclient.execute(httpGet); + // 判断返回状态是否为200 + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), "UTF-8"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + public static String doGet(String url) { + return doGet(url, null); + } + + public static String doPost(String url, Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList); + httpPost.setEntity(entity); + } + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return resultString; + } + + public static String doPost(String url) { + return doPost(url, null); + } + + public static String doPostJson(String url, String json) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + // 创建请求内容 + StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON); + httpPost.setEntity(entity); + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return resultString; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/IpUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/IpUtil.java new file mode 100644 index 0000000..4d0a44c --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/IpUtil.java @@ -0,0 +1,80 @@ +package com.chaozhanggui.system.cashierservice.util; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * @title: IpUtil + * @Description TODO + * @Author sixic + * @Date 2022/11/9 16:00 + */ +public class IpUtil { + + private static final String UNKNOWN = "unknown"; + private static final String LOCALHOST = "127.0.0.1"; + private static final String SEPARATOR = ","; + + public static String getIpAddr(HttpServletRequest request) { + System.out.println(request); + String ipAddress; + try { + ipAddress = request.getHeader("x-forwarded-for"); + if (ipAddress == null || ipAddress.length() == 0 || UNKNOWN.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || UNKNOWN.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || UNKNOWN.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (LOCALHOST.equals(ipAddress)) { + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + ipAddress = inet.getHostAddress(); + } + } + // 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + // "***.***.***.***".length() + if (ipAddress != null && ipAddress.length() > 15) { + if (ipAddress.indexOf(SEPARATOR) > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + } catch (Exception e) { + ipAddress = ""; + } + return ipAddress; + } + + /** + * 获取ip地址 + * + * @param request + * @return + */ + public static String getIpAddr2(HttpServletRequest request) { + String ip = request.getHeader("X-Real-IP"); + if (ip != null && !"".equals(ip) && !"unknown".equalsIgnoreCase(ip)) { + return ip; + } + ip = request.getHeader("X-Forwarded-For"); + if (ip != null && !"".equals(ip) && !"unknown".equalsIgnoreCase(ip)) { + int index = ip.indexOf(','); + if (index != -1) { + return ip.substring(0, index); + } else { + return ip; + } + } else { + return request.getRemoteAddr(); + } + } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/JSONUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/JSONUtil.java new file mode 100644 index 0000000..ad6e684 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/JSONUtil.java @@ -0,0 +1,210 @@ +package com.chaozhanggui.system.cashierservice.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Stone + * @version V1.0.0 + * @date 2020/2/12 + */ +public class JSONUtil { + + + /** + * 将对象转为JSON字符串 + * + * @param obj 被转的对象 + * @param dateFormat 日期格式,当传null或空串时,则被格式化为时间戳,否则返回指定的格式。例子:yyyy-MM-dd HH:mm:ss(不合法的日期格式会格式化出错) + * @param ignoreNull 是否忽略null字段。true时,且当字段的值是null,则不输出该字段 + * @param noRef 是否不转换成ref。例如false,当字段间是相同的引用之时,则将出现$ref之类的符号替代冗余的值 + * @param pretty 是否格式化JSON字符串以便有更好的可读性 + * @return JSON字符串,出异常时抛出 + */ + public static String toJSONString0(Object obj, + String dateFormat, + boolean ignoreNull, + boolean noRef, + boolean pretty) { + try { + List featureList = new ArrayList<>(); + + // 当传null时,则返回默认的时间戳,否则则返回指定的格式 + if (dateFormat != null && dateFormat.length() > 0) { + featureList.add(SerializerFeature.WriteDateUseDateFormat); + } + if (!ignoreNull) { + // 当字段的值是null时,依然出现这个字段,即不忽略 + featureList.add(SerializerFeature.WriteMapNullValue); + } + if (noRef) { + featureList.add(SerializerFeature.DisableCircularReferenceDetect); + } + if (pretty) { + featureList.add(SerializerFeature.PrettyFormat); + } + + SerializerFeature[] featureArr = featureList.toArray(new SerializerFeature[featureList.size()]); + return JSONObject.toJSONString(obj, SerializeConfig.globalInstance, null, dateFormat, + JSON.DEFAULT_GENERATE_FEATURE, featureArr); + } catch (Exception e) { + throw new RuntimeException("Convert object to JSON string, error[" + obj + "]", e); + } + } + + /** + * 将对象转为JSON字符串。 + * 日期转为特别的格式,不忽略null值的字段,不格式化JSON字符串 + * + * @param obj 被转换的对象 + * @return JSON字符串,发送异常时抛出 + */ + public static String toJSONString(Object obj) { + return toJSONString0(obj, "yyyy-MM-dd HH:mm:ss", false, true, false); + } + + /** + * 将对象转为JSON字符串。不抛出异常,专用于日志打印 + * + * @param obj 被转换的对象 + * @return JSON字符串,出异常时返回null + */ + public static String toJSONStringNoThrows(Object obj) { + try { + return toJSONString0(obj, "yyyy-MM-dd HH:mm:ss", false, true, false); + } catch (Exception e) { + logError(e); + return null; + } + } + + /** + * 解析JSON字符串成为一个Object,结果可能是JSONArray(多个)或JSONObject(单个) + * (该方法可用于对json字符串不知道是对象还是列表的时候之用) + * (假设json字符串多了某个字段,可能是新加上去的,显然转换成JSONEntity会有这个字段) + * + * @param jsonStr 要解析的JSON字符串 + * @return 返回JSONEntity,当jsonArrayFlag 为true,表示它是 JSONArray,否则是JSONObject + */ + public static JSONEntity parseJSONStr2JSONEntity(String jsonStr) { + try { + Object value = JSON.parse(jsonStr); + boolean jsonArrayFlag = false; + if (value instanceof JSONArray) { + jsonArrayFlag = true; + } + return new JSONEntity(jsonArrayFlag, value); + } catch (Exception e) { + throw new RuntimeException("Invalid jsonStr,parse error:" + jsonStr, e); + } + } + + /** + * 字符串转为JSON对象,注意数组类型会抛异常[{name:\"Stone\"}] + * (假设json字符串多了某个字段,可能是新加上去的,显然转换成JSONObject时会有这个字段,因为JSONObject就相当于map) + * + * @param jsonStr 传入的JSON字串 + * @return 返回转换结果。传入的JSON字串必须是对象而非数组,否则会抛出异常 + * @author Stone + */ + public static JSONObject parseJSONStr2JSONObject(String jsonStr) { + try { + return (JSONObject) JSONObject.parse(jsonStr); + } catch (Exception e) { + throw new RuntimeException("Invalid jsonStr,parse error:" + jsonStr, e); + } + } + + /** + * 字符串转为JSON数组,注意对象类型,非数组的会抛异常{name:\"Stone\"} + * (假设json字符串多了某个字段,可能是新加上去的,显然转换成JSONArray时,其元素会有这个字段,因为JSONArray的元素JSONObject就相当于map) + * + * @param jsonStr 传入的JSON字串 + * @return 返回转换结果。当传入的JSON字串是非数组形式时,会抛出异常 + * @author Stone + */ + public static JSONArray parseJSONStr2JSONArray(String jsonStr) { + try { + return (JSONArray) JSONArray.parse(jsonStr); + } catch (Exception e) { + throw new RuntimeException("Invalid jsonStr,parse error:" + jsonStr, e); + } + } + + /** + * 字符串转为某个类 + * (日期字段不管是时间戳形式还是yyyy-MM-dd HH:mm:ss的形式都能成功转换) + * (假设json字符串多了某个字段,可能是新加上去的,T类没有,转换成T对象的时候,不会抛出异常) + * + * @param jsonStr 传入的JSON字串 + * @param clazz 转为什么类型 + * @return 返回转换结果。当传入的JSON字串是数组形式时,会抛出异常 + * @author Stone + */ + public static T parseJSONStr2T(String jsonStr, Class clazz) { + try { + return JSONObject.parseObject(jsonStr, clazz); + } catch (Exception e) { + throw new RuntimeException("Invalid jsonStr,parse error:" + jsonStr, e); + } + } + + /** + * 字符串转为某个类的列表 + * (日期字段不管是时间戳形式还是yyyy-MM-dd HH:mm:ss的形式都能成功转换) + * (假设json字符串多了某个字段,可能是新加上去的,T类没有,转换成T对象的时候,不会抛出异常) + * + * @param jsonStr 传入的JSON字串 + * @param clazz List里装的元素的类型 + * @return 返回转换结果。当传入的JSON字串是非数组的形式时会抛出异常 + * @author Stone + */ + public static List parseJSONStr2TList(String jsonStr, Class clazz) { + try { + return JSONObject.parseArray(jsonStr, clazz); + } catch (Exception e) { + throw new RuntimeException("Invalid jsonStr,parse error:" + jsonStr, e); + } + } + + public static class JSONEntity { + public JSONEntity() { + } + + public JSONEntity(boolean jsonArrayFlag, Object value) { + this.jsonArrayFlag = jsonArrayFlag; + this.value = value; + } + + private boolean jsonArrayFlag; + private Object value; + + public boolean getJsonArrayFlag() { + return jsonArrayFlag; + } + + public Object getValue() { + return value; + } + + @Override + public String toString() { + return "JSONEntity{" + + "jsonArrayFlag=" + jsonArrayFlag + + ", value=" + value + + '}'; + } + } + + private static void logError(Exception e) { + e.printStackTrace(); + } +} + + diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/MD5Util.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/MD5Util.java new file mode 100644 index 0000000..a7b3b65 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/MD5Util.java @@ -0,0 +1,158 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; + +public class MD5Util { + + + private static final Logger log = LoggerFactory.getLogger(MD5Util.class); + + private static final String hexDigIts[] = {"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}; + + public static String encrypt(String plainText) { + try { + return encrypt(plainText,true); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + log.error("MD5加密异常:",e); + return null; + } + } + + /** + * @Title: encrypt + * @Description: TODO(16位或32位密码) + * @param @param + * plainText + * @param @param + * flag true为32位,false为16位 + * @throws UnsupportedEncodingException + */ + public static String encrypt(String plainText, boolean flag) throws UnsupportedEncodingException { + try { + if (ObjectUtil.isEmpty(plainText)) { + return null; + } + MessageDigest md = MessageDigest.getInstance("MD5"); + String encrStr = byteArrayToHexString(md.digest(plainText.getBytes("UTF-8"))); + if (flag) + return encrStr; + else + return encrStr.substring(8, 24); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + return null; + } + + } + + @SuppressWarnings("unchecked") + public static String encrypt(Object obj,String privateKey){ + if(obj==null){ + return null; + } + Map map = new HashMap(); + if(obj instanceof Map){ + map=(Map) obj; + }else{ + map = BeanUtil.transBean2Map(obj); + } + return encrypt(map,privateKey,true); + } + + /** + * @Title: encrypt + * @Description: TODO(16位或32位密码) + * @param @param + * plainText + * @param @param + * flag true为32位,false为16位 + * @throws UnsupportedEncodingException + */ + public static String encrypt(Map map, String privateKey,boolean flag) { + String param = null; + map.remove("sign"); + map.remove("encrypt"); + String result = BeanUtil.mapOrderStr(map); + if (StringUtils.isEmpty(result)) { + return null; + } + param = encrypt(encrypt(result)+privateKey); + if (flag) { + return param; + } else { + param = param.substring(8, 24); + } + return param; + } + + public static Map resultMap = new HashMap(); + @SuppressWarnings("unchecked") + public static Map mapFn(Map map) { + for (String key : map.keySet()) { + if (map.get(key) != null && map.get(key) != "" && (!key.equals("BTYPE") && !key.equals("SIGN"))) { + if (key.equals("INPUT")) { + if (map.get(key) != null) { + mapFn((Map) map.get(key)); + } + } else { + resultMap.put(key, map.get(key)); + } + } + } + return resultMap; + } + + @SuppressWarnings("unchecked") + public static boolean check(Object obj,String privateKey){ + Map map=new HashMap(); + if(obj==null){ + return false; + } + if(obj instanceof Map){ + map=(Map) obj; + }else{ + map = BeanUtil.transBean2Map(obj); + } + System.out.println("check:"+ JSONUtil.toJsonStr(map)); + String sign=(String)map.get("sign"); + if(sign==null){ + return false; + } + String str=encrypt(obj,privateKey); + System.out.println("check: "+str); + + return sign.equals(str)?true:false; + } + + public static String byteArrayToHexString(byte b[]){ + StringBuffer resultSb = new StringBuffer(); + for(int i = 0; i < b.length; i++){ + resultSb.append(byteToHexString(b[i])); + } + return resultSb.toString(); + } + + public static String byteToHexString(byte b){ + int n = b; + if(n < 0){ + n += 256; + } + int d1 = n / 16; + int d2 = n % 16; + return hexDigIts[d1] + hexDigIts[d2]; + } + + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/N.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/N.java new file mode 100644 index 0000000..6076fc4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/N.java @@ -0,0 +1,57 @@ +package com.chaozhanggui.system.cashierservice.util; + +import java.math.BigDecimal; + + +// 如果第一个参数与第二个参数相等返回0。 +// 如果第一个参数小于第二个参数返回 -1。 +// 如果第一个参数大于第二个参数返回 1。 +public class N { + + public static final int SCALE = 2; + + public static final boolean isZero(BigDecimal num) { + return num == null || BigDecimal.ZERO.compareTo(num) == 0; + } + + public static final boolean isNull(BigDecimal num) { + return num == null; + } + + + public static final boolean eq(BigDecimal n1, BigDecimal n2) { + return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) == 0);//n1==n2 + } + + public static final boolean gt(BigDecimal n1, BigDecimal n2) { + return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) > 0);//n1>n2 + } + + public static final boolean egt(BigDecimal n1, BigDecimal n2) { + return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) >= 0); + } + + + public static final BigDecimal mul(BigDecimal b1, BigDecimal b2) { + if (isNull(b1) || isNull(b2)) { + throw new IllegalArgumentException(); + } + + return b1.multiply(b2).setScale(SCALE, BigDecimal.ROUND_HALF_UP); + } + + + public static final BigDecimal div(BigDecimal b1, BigDecimal b2) { + if (isNull(b1) || isZero(b2)) { + throw new IllegalArgumentException(); + } + + return b1.divide(b2, SCALE, BigDecimal.ROUND_HALF_UP); + } + +// public static void main(String[] args){ +// System.out.println(N.mul(new BigDecimal(0.6),BigDecimal.ONE)); +// } + + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/PrinterUtils.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/PrinterUtils.java new file mode 100644 index 0000000..26a1c81 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/PrinterUtils.java @@ -0,0 +1,298 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.core.util.ObjectUtil; +import com.chaozhanggui.system.cashierservice.model.HandoverInfo; +import com.chaozhanggui.system.cashierservice.model.OrderDetailPO; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import java.util.*; + +/** + * 打印机 + */ +public class PrinterUtils { + + //请求地址 + private static final String URL_STR = "https://ioe.car900.com/v1/openApi/dev/customPrint.json"; + //APPID + private static final String APP_ID = "ZF544"; + //USERCODE + private static final String USER_CODE = "ZF544"; + //APPSECRET + private static final String APP_SECRET = "2022bsjZF544GAH"; + + /** + * 获取TOKEN值 + * @param timestamp 时间戳,13位 + * @param requestId 请求ID,自定义 + * @return + */ + private static Map getToken(String timestamp, String requestId) { + String token = ""; + String encode = ""; + SortedMap map = new TreeMap(); + map.put("appId", APP_ID); + map.put("timestamp", timestamp); + map.put("requestId", requestId); + map.put("userCode", USER_CODE); + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry next = iterator.next(); + String key = next.getKey(); + Object value = next.getValue(); + token += key + value; + encode += key + "=" + value + "&"; + } + System.out.println("token"+token); + Map finalMap = new HashMap<>(); + finalMap.put("ENCODE",encode); + System.out.println("+++++++++++++++"+token + APP_SECRET); + finalMap.put("TOKEN", MD5Util.encrypt(token + APP_SECRET).toUpperCase()); + return finalMap; + } + + + /** + * 厨房打印机 + * @param pickupNumber + * @param date + * @param productName + * @param number + * @param remark + * @return + */ + public static String getPrintData(String pickupNumber,String date,String productName,Integer number,String remark) { + StringBuilder builder = new StringBuilder(); + + builder.append(""+pickupNumber+"

    "); + builder.append("时间: "+date+"


    "); + + if(productName.length()>4||remark.length()>4){ + builder.append(""+productName+" "+number+"
    "); + builder.append(""+remark+"
    "); + }else { + builder.append(""+productName+" "+number+"
    "); + builder.append(""+remark+"
    "); + } + builder.append(""); + builder.append(""); + + return builder.toString(); + } + + + public static String getCashPrintData(OrderDetailPO detailPO,String type,String orderType){ + StringBuilder sb = new StringBuilder(); + + sb.append(""+detailPO.getMerchantName()+"

    "); + sb.append(""+type+"【"+detailPO.getMasterId()+"】

    "); + sb.append("订单号: "+detailPO.getOrderNo()+"
    "); + sb.append("交易时间: "+detailPO.getTradeDate()+"
    "); + sb.append("收银员: "+detailPO.getOperator()+"


    "); + sb.append("------------------------
    "); + char paddingCharacter = ' '; + sb.append(""+String.format("%-15s","品名").replace(' ', paddingCharacter)+String.format("%-4s","数量").replace(' ', paddingCharacter)+String.format("%4s","小计").replace(' ', paddingCharacter)+"
    "); + for (OrderDetailPO.Detail detail : detailPO.getDetailList()) { + if(detail.getProductName().length()>4){ + + int count=getProducrName(detail.getProductName()); + if(count<=0){ + int length=15-(detail.getProductName().length()-4); + sb.append(""+String.format("%-"+length+"s",detail.getProductName()).replace(' ', paddingCharacter)+String.format("%-4s",detail.getNumber()).replace(' ', paddingCharacter)+String.format("%8s",detail.getAmount()).replace(' ', paddingCharacter)+"
    "); + }else { + int length=15+count-(detail.getProductName().length()-4); + sb.append(""+String.format("%-"+length+"s",detail.getProductName()).replace(' ', paddingCharacter)+String.format("%-4s",detail.getNumber()).replace(' ', paddingCharacter)+String.format("%8s",detail.getAmount()).replace(' ', paddingCharacter)+"
    "); + } + + }else { + sb.append(""+String.format("%-15s",detail.getProductName()).replace(' ', paddingCharacter)+String.format("%-4s",detail.getNumber()).replace(' ', paddingCharacter)+String.format("%8s",detail.getAmount()).replace(' ', paddingCharacter)+"
    "); + } + + if(detail.getSpec()!=null&& ObjectUtil.isNotEmpty(detail.getSpec())){ + sb.append("规格:"+detail.getSpec()+"
    "); + } + + sb.append("
    "); + + } + sb.append("------------------------
    "); + String t="¥"+detailPO.getReceiptsAmount(); + t=String.format("%11s",t).replace(' ', paddingCharacter); + if(orderType.equals("return")){ + sb.append("应退"+t+"
    "); + }else { + sb.append("应收"+t+"
    "); + } + if(ObjectUtil.isNotEmpty(detailPO.getPayType())&&ObjectUtil.isNotNull(detailPO.getPayType())&&detailPO.getPayType().equals("deposit")){ + sb.append("储值¥"+detailPO.getReceiptsAmount()+"
    "); + sb.append("------------------------
    "); + sb.append("积分:"+detailPO.getIntegral()+"
    "); + } + + sb.append("余额:"+detailPO.getBalance()+"
    "); + sb.append("------------------------
    "); + + if(ObjectUtil.isNotEmpty(detailPO.getRemark())&&ObjectUtil.isNotNull(detailPO.getRemark())){ + sb.append("备注:"+detailPO.getRemark()+"
    "); + } + + + + sb.append("打印时间:"+DateUtils.getTime(new Date())+"
    "); + + sb.append(""); + sb.append(""); + return sb.toString(); + + } + + + public static String handoverprintData(HandoverInfo handoverInfo){ + StringBuilder sb = new StringBuilder(); + + sb.append(""+handoverInfo.getMerchantName()+"

    "); + sb.append("

    "); + sb.append("交班小票
    "); + sb.append("当班时间: "+handoverInfo.getStartTime()+"
    "); + sb.append("交班时间: "+handoverInfo.getEndTime()+"
    "); + sb.append("收银员: "+handoverInfo.getStaff()+"
    "); + sb.append("当班收入: "+handoverInfo.getTotalAmount()+"
    "); + if(ObjectUtil.isNotEmpty(handoverInfo.getPayInfos())&&handoverInfo.getPayInfos().size()>0){ + for (HandoverInfo.PayInfo payInfo : handoverInfo.getPayInfos()) { + sb.append(" "+payInfo.getPayType()+": "+payInfo.getAmount()+"
    "); + } + } + sb.append("会员数据
    "); + if(ObjectUtil.isNotEmpty(handoverInfo.getMemberData())&&handoverInfo.getMemberData().size()>0){ + for (HandoverInfo.MemberData memberDatum : handoverInfo.getMemberData()) { + sb.append(" "+memberDatum.getDeposit()+": "+memberDatum.getAmount()+"
    "); + } + } + sb.append("总收入: "+handoverInfo.getTotalAmount()+"
    "); + sb.append("备用金: "+handoverInfo.getImprest()+"
    "); + sb.append("应交金额: "+handoverInfo.getPayable()+"
    "); + sb.append("上交金额: "+handoverInfo.getHandIn()+"
    "); + + sb.append("

    "); + sb.append("总订单数:"+handoverInfo.getOrderNum()+"
    "); + sb.append("打印时间:"+DateUtils.getTime(new Date())+"
    "); + + sb.append(""); + sb.append(""); + return sb.toString(); + + } + + + + + + + + + + + + /** + * 打印票据 + * @throws Exception + */ + public static void printTickets(Integer actWay ,Integer cn,String devName,String data) { + //设备名称 + //行为方式 1:只打印数据 2:只播放信息 3:打印数据并播放信息 +// actWay = 3; +// //打印联数 +// int cn = 1; + //打印内容 + //播报语音数据体,字段参考文档IOT_XY_API11001 + + String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}"; + String time = String.valueOf(System.currentTimeMillis()); + String uuid = UUID.randomUUID().toString(); + + Map param = getToken(time, uuid); + //参数 + MultiValueMap multiValueMap = new LinkedMultiValueMap<>(); + multiValueMap.add("token",param.get("TOKEN")); + multiValueMap.add("devName",devName); + multiValueMap.add("actWay",actWay); + multiValueMap.add("cn",cn); + multiValueMap.add("data",data); + multiValueMap.add("voiceJson",voiceJson); + multiValueMap.add("appId",APP_ID); + multiValueMap.add("timestamp",time); + multiValueMap.add("requestId",uuid); + multiValueMap.add("userCode",USER_CODE); + RestTemplate restTemplate = new RestTemplate(); + HttpHeaders header = new HttpHeaders(); + header.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + + HttpEntity> httpEntity = new HttpEntity<>(multiValueMap,header); + String httpResponse = restTemplate.postForObject(URL_STR, + httpEntity, String.class); + + System.out.println("map"+httpResponse); + } + + + + + public static int getProducrName(String str){ + int count = 0; + int digitCount=0; + for (int i=0;i='a' && str.charAt(i)<='z') || (str.charAt(i)>='A' && str.charAt(i)<='Z')){ + count++; + } + + if (Character.isDigit(str.charAt(i))) { + digitCount++; + } + } + return count+digitCount; + } + + public static void main(String[] args)throws Exception { + +// +// List payInfos=new ArrayList<>(); +// +// payInfos.add(new HandoverInfo.PayInfo("现金","39.00")); +// payInfos.add(new HandoverInfo.PayInfo("微信支付","0.01")); +// payInfos.add(new HandoverInfo.PayInfo("储值卡支付","43.00")); +// payInfos.add(new HandoverInfo.PayInfo("银行卡支付","20.00")); +// +// List memberDatas=new ArrayList<>(); +// memberDatas.add(new HandoverInfo.MemberData("43.00","会员消费")); +// memberDatas.add(new HandoverInfo.MemberData("43.00","储值支付")); +// +// +// +// +// HandoverInfo handoverInfo=new HandoverInfo("冠军","2024-03-15 14:57:00","2024-03-15 14:59:00","【POS-1】 001",payInfos,memberDatas,"102.01","0.00","39.00","39.00","4"); +// +// +// printTickets(3,1,"ZF544PG03W00002",handoverprintData(handoverInfo)); + + + List detailList= new ArrayList<>(); + OrderDetailPO.Detail detail=new OrderDetailPO.Detail("花香水牛拿铁","1","19000.90","不甜,麻辣"); + + OrderDetailPO.Detail detail3=new OrderDetailPO.Detail("单位iiii","4","40000.00",null); + OrderDetailPO.Detail detail4=new OrderDetailPO.Detail("喔喔奶茶","1","19000.90","微甜,微辣"); + detailList.add(detail); + detailList.add(detail3); + detailList.add(detail4); + OrderDetailPO detailPO=new OrderDetailPO("牛叉闪闪","普通打印","#365","DD20240306134718468","2024-03-06 15:00:00","【POS-1】001","79000.80","5049758.96","deposit","0",detailList,"变态辣"); + + + printTickets(1,1,"ZF544PG03W00002",getCashPrintData(detailPO,"结算单","")); + + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/RSAUtils.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/RSAUtils.java new file mode 100644 index 0000000..cda9733 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/RSAUtils.java @@ -0,0 +1,202 @@ +package com.chaozhanggui.system.cashierservice.util; + +import java.io.ByteArrayOutputStream; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import javax.crypto.Cipher; +import org.apache.tomcat.util.codec.binary.Base64; + +public class RSAUtils { + + + /** + * RSA最大加密明文大小 + */ + private static final int MAX_ENCRYPT_BLOCK = 117; + + /** + * RSA最大解密密文大小 + */ + private static final int MAX_DECRYPT_BLOCK = 128; + + /** + * 获取密钥对 + * + * @return 密钥对 + */ + public static KeyPair getKeyPair() throws Exception { + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(1024); + return generator.generateKeyPair(); + } + + /** + * 获取私钥 + * + * @param privateKey 私钥字符串 + * @return + */ + public static PrivateKey getPrivateKey(String privateKey) throws Exception { + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + byte[] decodedKey = Base64.decodeBase64(privateKey.getBytes()); + PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(decodedKey); + return keyFactory.generatePrivate(keySpec); + } + + /** + * 获取公钥 + * + * @param publicKey 公钥字符串 + * @return + */ + public static PublicKey getPublicKey(String publicKey) throws Exception { + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + byte[] decodedKey = Base64.decodeBase64(publicKey.getBytes()); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(decodedKey); + return keyFactory.generatePublic(keySpec); + } + + /** + * RSA加密 + * + * @param data 待加密数据 + * @param publicKey 公钥 + * @return + */ + public static String encrypt(String data, PublicKey publicKey) throws Exception { + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, publicKey); + int inputLen = data.getBytes().length; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + int offset = 0; + byte[] cache; + int i = 0; + // 对数据分段加密 + while (inputLen - offset > 0) { + if (inputLen - offset > MAX_ENCRYPT_BLOCK) { + cache = cipher.doFinal(data.getBytes(), offset, MAX_ENCRYPT_BLOCK); + } else { + cache = cipher.doFinal(data.getBytes(), offset, inputLen - offset); + } + out.write(cache, 0, cache.length); + i++; + offset = i * MAX_ENCRYPT_BLOCK; + } + byte[] encryptedData = out.toByteArray(); + out.close(); + // 获取加密内容使用base64进行编码,并以UTF-8为标准转化成字符串 + // 加密后的字符串 + return new String(Base64.encodeBase64String(encryptedData)); + } + + /** + * RSA解密 + * + * @param data 待解密数据 + * @param privateKey 私钥 + * @return + */ + public static String decrypt(String data, PrivateKey privateKey) throws Exception { + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, privateKey); + byte[] dataBytes = Base64.decodeBase64(data); + int inputLen = dataBytes.length; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + int offset = 0; + byte[] cache; + int i = 0; + // 对数据分段解密 + while (inputLen - offset > 0) { + if (inputLen - offset > MAX_DECRYPT_BLOCK) { + cache = cipher.doFinal(dataBytes, offset, MAX_DECRYPT_BLOCK); + } else { + cache = cipher.doFinal(dataBytes, offset, inputLen - offset); + } + out.write(cache, 0, cache.length); + i++; + offset = i * MAX_DECRYPT_BLOCK; + } + byte[] decryptedData = out.toByteArray(); + out.close(); + // 解密后的内容 + return new String(decryptedData, "UTF-8"); + } + + /** + * 签名 + * + * @param data 待签名数据 + * @param privateKey 私钥 + * @return 签名 + */ + public static String sign(String data, PrivateKey privateKey) throws Exception { + byte[] keyBytes = privateKey.getEncoded(); + PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PrivateKey key = keyFactory.generatePrivate(keySpec); + Signature signature = Signature.getInstance("MD5withRSA"); + signature.initSign(key); + signature.update(data.getBytes()); + return new String(Base64.encodeBase64(signature.sign())); + } + + /** + * 验签 + * + * @param srcData 原始字符串 + * @param publicKey 公钥 + * @param sign 签名 + * @return 是否验签通过 + */ + public static boolean verify(String srcData, PublicKey publicKey, String sign) throws Exception { + byte[] keyBytes = publicKey.getEncoded(); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey key = keyFactory.generatePublic(keySpec); + Signature signature = Signature.getInstance("MD5withRSA"); + signature.initVerify(key); + signature.update(srcData.getBytes()); + Boolean flag=signature.verify(Base64.decodeBase64(sign.getBytes())); + return flag; + } + + public static void main(String[] args) { + try { + // 生成密钥对 +// KeyPair keyPair = getKeyPair(); +// String privateKey = new String(Base64.encodeBase64(keyPair.getPrivate().getEncoded())); +// String publicKey = new String(Base64.encodeBase64(keyPair.getPublic().getEncoded())); +// System.out.println("私钥:" + privateKey); +// System.out.println("公钥:" + publicKey); + + + String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMx5HH2xWlwPMPzsO4NTQoWoqZGkrHRvg/15EvBAuMyIfOlP7onES97TXiw8qIw4arDCknke3fld7mpA012TvJSINBYteBOFyBOkVPTlgVRlHYbibgkZh0LJMvQ47uHdk/HSTLjm056MfTgzmMR4IGzmXhhNBWOgeHvxriW4HPLwIDAQAB"; + String privateKey="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIzHkcfbFaXA8w/Ow7g1NChaipkaSsdG+D/XkS8EC4zIh86U/uicRL3tNeLDyojDhqsMKSeR7d+V3uakDTXZO8lIg0Fi14E4XIE6RU9OWBVGUdhuJuCRmHQsky9Dju4d2T8dJMuObTnox9ODOYxHggbOZeGE0FY6B4e/GuJbgc8vAgMBAAECgYBEDcFyLH1leEXHkXtZlBaXn1U6t9QIS018hze+06TFtLa57ZrgVZKBgac37M/+lw6Fp0ZJw6iLGgb71bgxHMdiSVPYlSVHLxp42isgafHwty82nt5I47P3+1OQHUD1LUV2HQpMYp7ptQV4jIymZik9ubM79fjT6z3posnrNWAVSQJBAMmkuWaHj8sS13Uz9B9t0jNHtRormxXe2nGiMbV/aQiFx6TvAGR8zEismR2fy0hkMfmH6GXProIimq8ZE5ksiCUCQQCyuquhBPHeRddnUUCjWEwyQV7ChjXdGto+NJ8Bf7LdqXsmdsQR21G1J557gWASZDz3UJcmm6pPxxXlXpziMT/DAkB1OcJfDOhXkriXdoCx1NKi5Ukv0bHzYP91mGl1roCNZ9jM1fVQdgz9IvpQ8pjnmPhErPI6XiaBmUR8DwQJxI3RAkA0mTkfRwxDRLySvFfQepDaDWDs0ICTlG579hKBZ2plT5ZdiIBFXQ0byhAa+sUiRHuosP/6rb8egVGRUhnLe4DvAkBKKr32EI+GSNSrfXktBTaWEkBRW21C6orlCvU7cpoJWb+KBHQzcRCsbDUH2/LM4uM0kuBSz0zK6H6VSWkY8VeR"; + + // RSA加密 + String data = "{\"name\":\"张三\"}"; + String encryptData = encrypt(data, getPublicKey(publicKey)); + System.out.println("加密后内容:" + encryptData); + // RSA解密 + String decryptData = decrypt(encryptData, getPrivateKey(privateKey)); + System.out.println("解密后内容:" + decryptData); + + // RSA签名 + String sign = sign(data, getPrivateKey(privateKey)); + + System.out.println("签名:"+sign); + // RSA验签 + boolean result = verify(data, getPublicKey(publicKey), sign); + System.out.print("验签结果:" + result); + } catch (Exception e) { + e.printStackTrace(); + System.out.print("加解密异常"); + } + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisConfig.java new file mode 100644 index 0000000..f7146c5 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisConfig.java @@ -0,0 +1,83 @@ +package com.chaozhanggui.system.cashierservice.util; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.RedisSerializer; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +/** + * @ClassName RedisConfig + * @Author Administrator + * @Date 2020/08/04 + * @Version 1.0 + * @Description + */ +@Configuration +public class RedisConfig { + + // 实例-单例模式 + private static RedisConfig redisConfig; + + @Value("${spring.redis.host}") + private String host; + + @Value("${spring.redis.port}") + private int port; + + @Value("${spring.redis.timeout}") + private int timeout; + + @Value("${spring.redis.password}") + private String password; + + @Value("${spring.redis.jedis.pool.max-idle}") + private int maxIdle; + + @Value("${spring.redis.jedis.pool.max-wait}") + private long maxWaitMillis; + + @Value("${spring.redis.block-when-exhausted}") + private boolean blockWhenExhausted; + + @Value("${spring.redis.database}") + private int database; + + /** + * 更换序列化器springSession默认序列化 + * + * @return + */ + @Bean("springSessionDefaultRedisSerializer") + public RedisSerializer setSerializer() { + return new GenericJackson2JsonRedisSerializer(); + } + + @Bean + public JedisPool redisPoolFactory() { + JedisPool jedisPool = new JedisPool(); + try { + JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); + jedisPoolConfig.setMaxIdle(maxIdle); + jedisPoolConfig.setMaxWaitMillis(maxWaitMillis); + // 连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true + jedisPoolConfig.setBlockWhenExhausted(blockWhenExhausted); + // 是否启用pool的jmx管理功能, 默认true + jedisPoolConfig.setJmxEnabled(true); + jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout,password,database); + } catch (Exception e) { + e.printStackTrace(); + } + return jedisPool; + } + @Bean + RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) { + RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(connectionFactory); + return container; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisCst.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisCst.java new file mode 100644 index 0000000..5f56db4 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisCst.java @@ -0,0 +1,16 @@ +package com.chaozhanggui.system.cashierservice.util; + +/** 功能描述:redis前缀 +* @params: +* @return: +* @Author: wgc +* @Date: 2020-12-19 15:02 +*/ +public class RedisCst { + + + //在线用户 + public static final String ONLINE_USER = "ONLINE:USER"; + public static final String CART = "CZG:CART:"; + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisUtil.java new file mode 100644 index 0000000..b88103b --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/RedisUtil.java @@ -0,0 +1,580 @@ +package com.chaozhanggui.system.cashierservice.util; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.params.SetParams; + +import java.util.*; + +/** + * @ClassName RedisUtil + * @Author wgc + * @Date 2019/12/9 14:28 + * @Version 1.0 + * @Description redis工具类 + */ +@Component +public class RedisUtil { + // 成功标识 + private static final int REDIS_SUCCESS = 1; + // 失败标识 + private static final int REDIS_FAILED = -1; + @Value("${spring.redis.database}") + private int database; + + + @Autowired + private JedisPool pool; + + + /** + * @param key + * @param message + * @return boolean + * @Description: 保存StrinRedisConfigg信息 + * @author SLy + * @date 2018-12-19 19:49 + */ + public Integer saveMessage(String key, String message) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return REDIS_FAILED; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + + jedis.set(key, message); + return REDIS_SUCCESS; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return REDIS_FAILED; + } + + public boolean exists(String key) { + Jedis jedis = null; + boolean flag = false; + try { + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + if (jedis.exists(key)) { + return true; + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return flag; + } + + /** + * 尝试获取分布式锁 + * + * @param jedis Redis客户端 + * @param lockKey 锁 + * @param requestId 请求标识 + * @param millisecondsToExpire 超期时间 + * @return 是否获取成功 + */ + String luaLock = + "local key = KEYS[1] " + + "local requestId = KEYS[2] " + + "local ttl = tonumber(KEYS[3]) " + + "local result = redis.call('setnx', key, requestId) " + + "if result == 1 then " + + " redis.call('pexpire', key, ttl) " + + "else " + + " result = -1; " + + " local value = redis.call('get', key) " + + " if (value == requestId) then " + + " result = 1; " + + " redis.call('pexpire', key, ttl) " + + " end " + + "end " + + "return result "; + + public static boolean tryGetDistributedLock(Jedis jedis, String lockKey, String requestId, long millisecondsToExpire) { + + String result = jedis.set(lockKey, requestId, SetParams.setParams().nx().px(millisecondsToExpire)); + + if ("OK".equals(result)) { + return true; + } + return false; + } + + /** + * 释放分布式锁 + * + * @param lockKey 锁 + * @param requestId 请求标识 + * @return 是否释放成功 + */ + public boolean releaseDistributedLock(String lockKey, String requestId) { + Jedis jedis = null; + try { + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + String script = "if redis.call('get', KEYS[1]) == ARGV[1] then return redis.call('del', KEYS[1]) else return 0 end"; + Object result = jedis.eval(script, Collections.singletonList(lockKey), Collections.singletonList(requestId)); + if ("true".equals(result)) { + return true; + } + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return false; + + } + + + /** + * @param key + * @param message + * @param expire + * @return + * @Description: 保存String信息(生命周期单位秒) + * @author wgc + * @date 2018-12-19 19:49 + */ + public Integer saveMessage(String key, String message, int expire) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return REDIS_FAILED; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + jedis.set(key, message); + jedis.expire(key, expire); + + return REDIS_SUCCESS; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return REDIS_FAILED; + } + + /** + * @param key + * @param message + * @return + * @Description: 保存byte[]信息 + * @author SLy + * @date 2018-12-19 19:49 + */ + public Integer saveMessage(String key, byte[] message) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return REDIS_FAILED; + } + + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + jedis.set(key.getBytes(), message); + return REDIS_SUCCESS; + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return REDIS_FAILED; + } + + + /** + * @param key + * @return + * @Description: 获取String对象类型值 + * @author SLy + * @date 2018-12-19 19:49 + */ + public String getMessage(String key) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return null; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + // 获取jedis实例后可以对redis服务进行一系列的操作 + if (database != 0) { + jedis.select(database); + } + String value = jedis.get(key); + + return value; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return null; + } + + /** + * @param key + * @return + * @Description: 获取String对象类型值 + * @author SLy + * @date 2018-12-19 19:49 + */ + public Set getAllMessage(String key) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return null; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + // 获取jedis实例后可以对redis服务进行一系列的操作 + if (database != 0) { + jedis.select(database); + } + Set value = jedis.keys(key); + + return value; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return null; + } + + /** + * @param key + * @return + * @Description: 通过key删除数据 + * @author SLy + * @date 2018-12-19 19:49 + */ + public Integer deleteByKey(String key) { + Jedis jedis = null; + try { + if (StringUtils.isEmpty(key)) { + return REDIS_FAILED; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + jedis.del(key); + return REDIS_SUCCESS; + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return REDIS_FAILED; + } + + /** + * @param key + * @return + * @Description: 通过key删除数据 + * @author SLy + * @date 2018-12-19 19:49 + */ + public TreeSet keys(String key) { + Jedis jedis = null; + TreeSet keys = new TreeSet<>(); + try { + if (StringUtils.isEmpty(key)) { + return null; + } + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + keys.addAll(jedis.keys(key)); + return keys; + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return null; + } + + + public int getIncrementNum(String key, String message) { + Jedis jedis = null; + try { + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + String sss = jedis.get(key); + if (StringUtils.isBlank(jedis.get(key))) { + Calendar cal = Calendar.getInstance(); + cal.add(Calendar.DAY_OF_YEAR, 1); + cal.set(Calendar.HOUR_OF_DAY, 0); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MINUTE, 0); + cal.set(Calendar.MILLISECOND, 0); + long aa = (cal.getTimeInMillis() - System.currentTimeMillis()) / 1000; + int time = new Long(aa).intValue(); + jedis.set(key, message); + jedis.expire(key, time); + } + jedis.incr(key); + return REDIS_SUCCESS; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + + return REDIS_FAILED; + } + + public int getIncrNum(String key, String message) { + Jedis jedis = null; + try { + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + if (message.equals("1")) { + jedis.decr(key); + } else { + jedis.incr(key); + } + return REDIS_SUCCESS; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + + return REDIS_FAILED; + } + + public int getTicketNum(String key) { + Jedis jedis = null; + try { + // 从jedis池中获取一个jedis实例 + jedis = pool.getResource(); + if (database != 0) { + jedis.select(database); + } + jedis.incr(key); + return REDIS_SUCCESS; + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return REDIS_FAILED; + } + + //添加元素 + public void addToCart(String key, String spec, int quantity) { + Jedis jedis = null; + try { + jedis.zincrby(key, quantity, spec); + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + } + + // 删除元素 + public void removeFromCart(String key, String spec, int quantity) { + Jedis jedis = null; + try { + jedis.zincrby(key, -quantity, spec); + + // 检查是否为零,如果为零,则删除该规格 + double newQuantity = jedis.zscore(key, spec); + if (newQuantity <= 0) { + jedis.zrem(key, spec); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + } + + // 获取集合元素 + public void getCartContents(String key) { + Jedis jedis = null; + try { + jedis.zrangeWithScores(key, 0, -1).forEach(item -> { + System.out.println("Spec: " + item.getElement() + ", Quantity: " + (int) item.getScore()); + }); + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + } + + public Set getSet(String key ){ + Jedis jedis = null ; + Set set = null ; + try { + jedis = pool.getResource(); + set = jedis.smembers(key); + }catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return set ; + } + /** + * 往set中添加数据 + * @param key + * @param values + * @return + */ + public Long addSet(String key , String... values ){ + Jedis jedis = null ; + try { + jedis = pool.getResource(); + return jedis.sadd(key,values); + }catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return 0L ; + } + /** + * 删除数据 + * @param key + * @param values + * @return + */ + public Boolean execsSet(String key,String values){ + Jedis jedis = null ; + try { + jedis = pool.getResource(); + return jedis.sismember(key,values); + }catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return false ; + } + public Long delSet(String key , String... values ){ + Jedis jedis = null ; + try { + jedis = pool.getResource(); + return jedis.srem(key,values); + }catch (Exception e) { + e.printStackTrace(); + } finally { + // 释放对象池,即获取jedis实例使用后要将对象还回去 + if (jedis != null) { + jedis.close(); + } + } + return 0L ; + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/SHA1Util.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/SHA1Util.java new file mode 100644 index 0000000..e82667f --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/SHA1Util.java @@ -0,0 +1,85 @@ +package com.chaozhanggui.system.cashierservice.util; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SHA1Util { + + private static final Logger log = LoggerFactory.getLogger(SHA1Util.class); + public static String encrypt(String str){ + if (null == str || 0 == str.length()){ + return null; + } + char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f'}; + try { + MessageDigest mdTemp = MessageDigest.getInstance("SHA1"); + mdTemp.update(new String(str.getBytes("iso8859-1"), "utf-8").getBytes()); + byte[] md = mdTemp.digest(); + int j = md.length; + char[] buf = new char[j * 2]; + int k = 0; + for (int i = 0; i < j; i++) { + byte byte0 = md[i]; + buf[k++] = hexDigits[byte0 >>> 4 & 0xf]; + buf[k++] = hexDigits[byte0 & 0xf]; + } + return new String(buf); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + log.error("SHA1加密异常:",e); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + log.error("SHA1加密异常:",e); + } + return str; + } + + @SuppressWarnings("unchecked") + public static String encrypt(Object obj) { + if(obj==null){ + return null; + } + Map map = new HashMap(); + if(obj instanceof Map){ + map=(Map) obj; + }else{ + map = BeanUtil.transBean2Map(obj); + } + map.remove("sign"); + map.remove("encrypt"); + String result = BeanUtil.mapOrderStr(map); + if (StringUtils.isEmpty(result)) { + return null; + } + return encrypt(result); + } + + @SuppressWarnings("unchecked") + public static boolean check(Object obj){ + Map map=new HashMap(); + if(obj==null){ + return false; + } + if(obj instanceof Map){ + map=(Map) obj; + }else{ + map = BeanUtil.transBean2Map(obj); + } + String sign=(String)map.get("sign"); + if(sign==null){ + return false; + } + String str=encrypt(obj); + return sign.equals(str)?true:false; + + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/SignUtils.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/SignUtils.java new file mode 100644 index 0000000..7c1a237 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/SignUtils.java @@ -0,0 +1,137 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import org.apache.tomcat.util.codec.binary.Base64; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.util.Map; +import java.util.TreeMap; + +/** + * 签名工具类 + */ +@Slf4j +public class SignUtils { + + /** + * 获取签名之前的源串 按照ASCII 排序 + * + * @param object + * @return + */ + public static String getSignContent(JSONObject object) { + TreeMap map = JSONObject.parseObject(JSONObject.toJSONString(object), TreeMap.class); + StringBuilder sb = new StringBuilder(); + for (Map.Entry o : map.entrySet()) { + String key = o.getKey(); + Object value = o.getValue(); + if ("sign".contains(key)) { + continue; + } + if (value != null) { + sb.append(key).append("=").append(value).append("&"); +// if(value instanceof ArrayList || value instanceof Map){ +// sb.append(key).append("=").append(JSON.toJSONString(value)).append("&"); +// }else{ +// sb.append(key).append("=").append(value).append("&"); +// } + } + } + sb.deleteCharAt(sb.length() - 1); + return sb.toString(); + } + + public static String wapGetSign(JSONObject object,String key) { + String checkSign = MD5Util.encrypt(getSignContent(object) + "&key=" + key, "UTF-8"); + return checkSign; + } + + /** + * 获取签名之前的源串 按照ASCII 排序 + * + * @param object + * @return + */ + public static String getYSSignContent(JSONObject object) { + String s = JSONObject.toJSONString(object); + TreeMap map = JSONObject.parseObject(s, TreeMap.class); + StringBuilder sb = new StringBuilder(); + for (Map.Entry o : map.entrySet()) { + String key = o.getKey(); + Object value = o.getValue(); + if ("sign".contains(key)) { + continue; + } + if (ObjectUtil.isNotEmpty(value)) { + sb.append(key).append("=").append(value).append("&"); + } + } + sb.deleteCharAt(sb.length() - 1); + return sb.toString(); + } + + public static String getSignContent1(JSONObject object,String appSerct) { + TreeMap map = JSONObject.parseObject(JSONObject.toJSONString(object), TreeMap.class); + StringBuilder sb = new StringBuilder(); + for (Map.Entry o : map.entrySet()) { + String key = o.getKey(); + Object value = o.getValue(); + if ("sign".contains(key)) { + continue; + } + if (ObjectUtil.isNotEmpty(value)) { + sb.append(key).append(value); + } + } + sb.append(appSerct); + return sb.toString(); + } + + public static String sha1Encrypt(String str) { + if (str == null || str.length() == 0) { + return null; + } + char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f' }; + try { + MessageDigest mdTemp = MessageDigest.getInstance("SHA1"); + mdTemp.update(str.getBytes(StandardCharsets.UTF_8)); + + byte[] md = mdTemp.digest(); + int j = md.length; + char[] buf = new char[j * 2]; + int k = 0; + + for (byte byte0 : md) { + buf[k++] = hexDigits[byte0 >>> 4 & 0xf]; + buf[k++] = hexDigits[byte0 & 0xf]; + } + return new String(buf); + } catch (Exception e) { + return null; + } + } + public static String HMACSHA256BYTE(String data, String key) { + String hash = ""; + try { + Mac sha256_HMAC = Mac.getInstance("HmacSHA256"); + SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256"); + sha256_HMAC.init(secret_key); + byte[] array = sha256_HMAC.doFinal(data.getBytes()); + hash = Base64.encodeBase64String(array); + } catch (Exception e) { + e.printStackTrace(); + } + return hash; + } + + public static String getSignSha256(JSONObject params, String accessKeySecret) { + return HMACSHA256BYTE(getSignContent(params),accessKeySecret); + } + +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/SnowFlakeUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/SnowFlakeUtil.java new file mode 100644 index 0000000..aa284b8 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/SnowFlakeUtil.java @@ -0,0 +1,48 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; +import lombok.extern.slf4j.Slf4j; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Random; + +/** + * @author Exrickx + */ +@Slf4j +public class SnowFlakeUtil { + + /** + * 派号器workid:0~31 + * 机房datacenterid:0~31 + */ + private static Snowflake snowflake = IdUtil.createSnowflake(1, 1); + + public static Long nextId() { + return snowflake.nextId(); + } + + + + + + public static String generateOrderNo(){ + String dateFormat="yyyyMMddHHmmssSSS"; + SimpleDateFormat sm=new SimpleDateFormat(dateFormat); + + String currentDate=sm.format(new Date()); + + Random rm=new Random(); + int suffix=rm.nextInt(9999999); + + return currentDate.concat(String.format("%07d",suffix)); + } + + public static void main(String[] args){ + for(int i=0;i<10;i++){ + System.out.println(SnowFlakeUtil.generateOrderNo()); + } + } +} diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/util/TokenUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/util/TokenUtil.java new file mode 100644 index 0000000..286d119 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/util/TokenUtil.java @@ -0,0 +1,109 @@ +package com.chaozhanggui.system.cashierservice.util; + +import cn.hutool.json.JSONArray; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import org.springframework.cglib.beans.BeanMap; + +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * @author admin + * @date 2020/8/6 13:04 + */ +public class TokenUtil { + + /** + * 设置过期时间 + */ + public static final long EXPIRE_DATE=24*60*60*1000*365; + /** + * token秘钥 + */ + private static final String TOKEN_SECRET = "BBDFSDFHFGHSGSRTRESDFSDFS"; + + /** + * + * @param accountId + * @param loginName + * @param clientType + * @param shopId + * @return + * @throws Exception + */ + public static String generateToken(String accountId,String loginName,String clientType, + String shopId,String staffId,String code) throws Exception { + Map claims = new HashMap<>(1); + claims.put("accountId", accountId); + claims.put("loginName",loginName); + claims.put("clientType",clientType); + claims.put("shopId",shopId); + claims.put("staffId",staffId); + claims.put("code",code); + return generateToken(claims); + } + + /** + * 生成token + * @param claims + * @return String + */ + private static String generateToken(Map claims) throws Exception { + return Jwts.builder() + .setClaims(claims) + .setExpiration(new Date(System.currentTimeMillis()+EXPIRE_DATE)) + .setIssuedAt(new Date()) + .signWith(SignatureAlgorithm.HS256,TOKEN_SECRET) + .compact(); + } + + public static String refreshToken(String token) { + String refreshedToken; + try { + final Claims claims = Jwts.parser() + .setSigningKey(TOKEN_SECRET) + .parseClaimsJws(token) + .getBody(); + refreshedToken = generateToken(claims); + } catch (Exception e) { + refreshedToken = null; + } + return refreshedToken; + } + + public static String verifyToken(String token) { + String result = ""; + try { + Claims claims = Jwts.parser() + .setSigningKey(TOKEN_SECRET) + .parseClaimsJws(token) + .getBody(); + result = "1"; + } catch (Exception e) { + result = "0"; + } + return result; + } + + /** + * 从token获取用户信息 + * @param token token + * @return 用户Id + */ + public static JSONObject parseParamFromToken(final String token) { + Claims claims = Jwts.parser() + .setSigningKey(TOKEN_SECRET) + .parseClaimsJws(token) + .getBody(); + JSONObject jsonObject = (JSONObject) JSONObject.toJSON(claims); + return jsonObject; + } + + public static void main(String[] args) { + parseParamFromToken("eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50SWQiOiI2IiwiY2xpZW50VHlwZSI6InBjIiwic2hvcElkIjoiMTUiLCJleHAiOjE3MTA1ODc3NjAsImlhdCI6MTcwOTExNjUzMSwibG9naW5OYW1lIjoiMTg4MjE3Nzc4OCJ9.RXfyRgkfC13JGVypd9TQvbNNl_-btyQ-7xnvlj3ej0M"); + } +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..13fe19d --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,56 @@ +spring: + application: + name: cashierService + datasource: + url: jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true + username: root + password: mysqlroot@123 + driver-class-name: com.mysql.cj.jdbc.Driver + initialSize: 5 + minIdle: 5 + maxActive: 20 + maxWait: 60000 + logging: + level: + com.chaozhanggui.system.openness: info + redis: + # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 + database: 1 + # redis服务器地址(默认为localhost) + host: 101.37.12.135 + # redis端口(默认为6379) + port: 6379 + # redis访问密码(默认为空) + password: 111111 + # redis连接超时时间(单位为毫秒) + timeout: 1000 + block-when-exhausted: true + # redis连接池配置 + jedis: + pool: + max-active: 8 + max-idle: 1024 + min-idle: 0 + max-wait: -1 + main: + allow-circular-references: true + rabbitmq: + host: 101.37.12.135 + port: 5672 + username: admin + password: Czg666888 +#分页配置 +pagehelper: + supportMethodsArguments: true + reasonable: true + helperDialect: mysql + params: count=countSql + +mybatis: + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath:mapper/*.xml + + + diff --git a/src/main/resources/application-hph.yml b/src/main/resources/application-hph.yml new file mode 100644 index 0000000..6861969 --- /dev/null +++ b/src/main/resources/application-hph.yml @@ -0,0 +1,59 @@ +spring: + datasource: + url: jdbc:mysql://rm-bp1b572nblln4jho2po.mysql.rds.aliyuncs.com/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false + username: root + password: Czg666888 + driver-class-name: com.mysql.cj.jdbc.Driver + initialSize: 5 + minIdle: 5 + maxActive: 20 + maxWait: 60000 + logging: + level: + com.chaozhanggui.system.openness: info + redis: + # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 + database: 5 + # redis服务器地址(默认为localhost) + host: 101.37.12.135 + # redis端口(默认为6379) + port: 6379 + # redis访问密码(默认为空) + password: 111111 + # redis连接超时时间(单位为毫秒) + timeout: 1000 + block-when-exhausted: true + # redis连接池配置 + jedis: + pool: + max-active: 8 + max-idle: 1024 + min-idle: 0 + max-wait: -1 + main: + allow-circular-references: true + rabbitmq: + host: 101.37.12.135 + port: 5672 + username: admin + password: Czg666888 +#分页配置 +pagehelper: + supportMethodsArguments: true + reasonable: true + helperDialect: mysql + params: count=countSql + +mybatis: + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath:mapper/*.xml +ysk: + url: https://gatewaytestapi.sxczgkj.cn/gate-service/ + callBackurl: https://p40312246f.goho.co/cashierService/notify/notifyCallBack + callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack + default: 18710449883 + + + diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..b877def --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,57 @@ +spring: + application: + name: cashierService + datasource: + url: jdbc:mysql://rm-bp1b572nblln4jho2.mysql.rds.aliyuncs.com/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true + username: root + password: Czg666888 + driver-class-name: com.mysql.cj.jdbc.Driver + initialSize: 5 + minIdle: 5 + maxActive: 20 + maxWait: 60000 + logging: + level: + com.chaozhanggui.system.openness: debug + redis: + # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 + database: 0 + # redis服务器地址(默认为localhost) + host: 127.0.0.1 + # redis端口(默认为6379) + port: 6379 + # redis访问密码(默认为空) + password: 111111 + # redis连接超时时间(单位为毫秒) + timeout: 1000 + block-when-exhausted: true + # redis连接池配置 + jedis: + pool: + max-active: 8 + max-idle: 1024 + min-idle: 0 + max-wait: -1 + + main: + allow-circular-references: true + rabbitmq: + host: 127.0.0.1 + port: 5672 + username: admin + password: Czg666888 +#分页配置 +pagehelper: + supportMethodsArguments: true + reasonable: true + helperDialect: mysql + params: count=countSql + +mybatis: + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath:mapper/*.xml + + + diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..d05012b --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,56 @@ +spring: + application: + name: cashierService + datasource: + url: jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false + username: root + password: mysqlroot@123 + driver-class-name: com.mysql.cj.jdbc.Driver + initialSize: 5 + minIdle: 5 + maxActive: 20 + maxWait: 60000 + logging: + level: + com.chaozhanggui.system.openness: debug + redis: + # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 + database: 2 + # redis服务器地址(默认为localhost) + host: 101.37.12.135 + # redis端口(默认为6379) + port: 6379 + # redis访问密码(默认为空) + password: 111111 + # redis连接超时时间(单位为毫秒) + timeout: 1000 + block-when-exhausted: true + # redis连接池配置 + jedis: + pool: + max-active: 8 + max-idle: 1024 + min-idle: 0 + max-wait: -1 + main: + allow-circular-references: true + rabbitmq: + host: 127.0.0.1 + port: 5672 + username: admin + password: Czg666888 +#分页配置 +pagehelper: + supportMethodsArguments: true + reasonable: true + helperDialect: mysql + params: count=countSql + +mybatis: + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath:mapper/*.xml + + + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..7b01699 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,42 @@ +spring: + profiles: + active: hph +server: + port: 10587 + servlet: + context-path: /cashier-client/ +# 日志配置 +logging: + level: + # web日志 + org.springframework.web: debug + # mybatis日志 + org.mybatis: debug + charset: + # 输出控制台编码 + console: UTF-8 + # 输出文件编码 + file: UTF-8 + # 输出文件名及路径,不配置则不输出文件 + file: + # 切记,该文件表示正在产出日志的日志文件。并不会打包,当文件大于max-file-size,会根据file-name-pattern格式打包 + # 名称为log/cashier-client.log文件夹会在项目根目录下,打包后会在启动包同目录下;名称为/log/cashier-client.log的文件夹会在项目所在磁盘的跟目录下 + name: log/cashier-client.log + logback: + rollingpolicy: + # 单文件的大小,默认10M, 超过之后打包成一个日志文件 + max-file-size: 1MB + # 日志保存的天数 + max-history: 30 + # 打包文件格式,默认: ${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz,书写格式为:文件路径/文件名.%i.文件后缀,其中%i不可省去,否则无日志显示 + # 例如: 日期为:2021/11/5 ,则打包文件之后为: log/ota.2021-11-05.0.gz,0表示日志的第一部分,后续就是,1,2,3... + # 如果是压缩包,里面会多一个名log/ota.2021-11-05.0的日志文件 + # 如下面的例子,打包之后为: log/2021-11/cashier-client.2020-11-5.0.log,这是一个日志文件 + file-name-pattern: log/%d{yyyy-MM}/cashier-client.%d{yyyy-MM-dd}.%i.log + + +gateway: + url: https://gatewaytestapi.sxczgkj.cn/gate-service/ +client: + backUrl: https://p40312246f.goho.co/cashier-client/notify/notifyPay + diff --git a/src/main/resources/generator-mapper/generatorConfig.xml b/src/main/resources/generator-mapper/generatorConfig.xml new file mode 100644 index 0000000..1650fcb --- /dev/null +++ b/src/main/resources/generator-mapper/generatorConfig.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    \ No newline at end of file diff --git a/src/main/resources/mapper/CodeColumnConfigMapper.xml b/src/main/resources/mapper/CodeColumnConfigMapper.xml new file mode 100644 index 0000000..e0d67b9 --- /dev/null +++ b/src/main/resources/mapper/CodeColumnConfigMapper.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + column_id, table_name, column_name, column_type, dict_name, extra, form_show, form_type, + key_type, list_show, not_null, query_type, remark, date_annotation + + + + delete from code_column_config + where column_id = #{columnId,jdbcType=BIGINT} + + + insert into code_column_config (column_id, table_name, column_name, + column_type, dict_name, extra, + form_show, form_type, key_type, + list_show, not_null, query_type, + remark, date_annotation) + values (#{columnId,jdbcType=BIGINT}, #{tableName,jdbcType=VARCHAR}, #{columnName,jdbcType=VARCHAR}, + #{columnType,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, + #{formShow,jdbcType=BIT}, #{formType,jdbcType=VARCHAR}, #{keyType,jdbcType=VARCHAR}, + #{listShow,jdbcType=BIT}, #{notNull,jdbcType=BIT}, #{queryType,jdbcType=VARCHAR}, + #{remark,jdbcType=VARCHAR}, #{dateAnnotation,jdbcType=VARCHAR}) + + + insert into code_column_config + + + column_id, + + + table_name, + + + column_name, + + + column_type, + + + dict_name, + + + extra, + + + form_show, + + + form_type, + + + key_type, + + + list_show, + + + not_null, + + + query_type, + + + remark, + + + date_annotation, + + + + + #{columnId,jdbcType=BIGINT}, + + + #{tableName,jdbcType=VARCHAR}, + + + #{columnName,jdbcType=VARCHAR}, + + + #{columnType,jdbcType=VARCHAR}, + + + #{dictName,jdbcType=VARCHAR}, + + + #{extra,jdbcType=VARCHAR}, + + + #{formShow,jdbcType=BIT}, + + + #{formType,jdbcType=VARCHAR}, + + + #{keyType,jdbcType=VARCHAR}, + + + #{listShow,jdbcType=BIT}, + + + #{notNull,jdbcType=BIT}, + + + #{queryType,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{dateAnnotation,jdbcType=VARCHAR}, + + + + + update code_column_config + + + table_name = #{tableName,jdbcType=VARCHAR}, + + + column_name = #{columnName,jdbcType=VARCHAR}, + + + column_type = #{columnType,jdbcType=VARCHAR}, + + + dict_name = #{dictName,jdbcType=VARCHAR}, + + + extra = #{extra,jdbcType=VARCHAR}, + + + form_show = #{formShow,jdbcType=BIT}, + + + form_type = #{formType,jdbcType=VARCHAR}, + + + key_type = #{keyType,jdbcType=VARCHAR}, + + + list_show = #{listShow,jdbcType=BIT}, + + + not_null = #{notNull,jdbcType=BIT}, + + + query_type = #{queryType,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + date_annotation = #{dateAnnotation,jdbcType=VARCHAR}, + + + where column_id = #{columnId,jdbcType=BIGINT} + + + update code_column_config + set table_name = #{tableName,jdbcType=VARCHAR}, + column_name = #{columnName,jdbcType=VARCHAR}, + column_type = #{columnType,jdbcType=VARCHAR}, + dict_name = #{dictName,jdbcType=VARCHAR}, + extra = #{extra,jdbcType=VARCHAR}, + form_show = #{formShow,jdbcType=BIT}, + form_type = #{formType,jdbcType=VARCHAR}, + key_type = #{keyType,jdbcType=VARCHAR}, + list_show = #{listShow,jdbcType=BIT}, + not_null = #{notNull,jdbcType=BIT}, + query_type = #{queryType,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + date_annotation = #{dateAnnotation,jdbcType=VARCHAR} + where column_id = #{columnId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/CodeGenConfigMapper.xml b/src/main/resources/mapper/CodeGenConfigMapper.xml new file mode 100644 index 0000000..66a73d4 --- /dev/null +++ b/src/main/resources/mapper/CodeGenConfigMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + config_id, table_name, author, cover, module_name, pack, path, api_path, prefix, + api_alias + + + + delete from code_gen_config + where config_id = #{configId,jdbcType=BIGINT} + + + insert into code_gen_config (config_id, table_name, author, + cover, module_name, pack, + path, api_path, prefix, + api_alias) + values (#{configId,jdbcType=BIGINT}, #{tableName,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, + #{cover,jdbcType=BIT}, #{moduleName,jdbcType=VARCHAR}, #{pack,jdbcType=VARCHAR}, + #{path,jdbcType=VARCHAR}, #{apiPath,jdbcType=VARCHAR}, #{prefix,jdbcType=VARCHAR}, + #{apiAlias,jdbcType=VARCHAR}) + + + insert into code_gen_config + + + config_id, + + + table_name, + + + author, + + + cover, + + + module_name, + + + pack, + + + path, + + + api_path, + + + prefix, + + + api_alias, + + + + + #{configId,jdbcType=BIGINT}, + + + #{tableName,jdbcType=VARCHAR}, + + + #{author,jdbcType=VARCHAR}, + + + #{cover,jdbcType=BIT}, + + + #{moduleName,jdbcType=VARCHAR}, + + + #{pack,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{apiPath,jdbcType=VARCHAR}, + + + #{prefix,jdbcType=VARCHAR}, + + + #{apiAlias,jdbcType=VARCHAR}, + + + + + update code_gen_config + + + table_name = #{tableName,jdbcType=VARCHAR}, + + + author = #{author,jdbcType=VARCHAR}, + + + cover = #{cover,jdbcType=BIT}, + + + module_name = #{moduleName,jdbcType=VARCHAR}, + + + pack = #{pack,jdbcType=VARCHAR}, + + + path = #{path,jdbcType=VARCHAR}, + + + api_path = #{apiPath,jdbcType=VARCHAR}, + + + prefix = #{prefix,jdbcType=VARCHAR}, + + + api_alias = #{apiAlias,jdbcType=VARCHAR}, + + + where config_id = #{configId,jdbcType=BIGINT} + + + update code_gen_config + set table_name = #{tableName,jdbcType=VARCHAR}, + author = #{author,jdbcType=VARCHAR}, + cover = #{cover,jdbcType=BIT}, + module_name = #{moduleName,jdbcType=VARCHAR}, + pack = #{pack,jdbcType=VARCHAR}, + path = #{path,jdbcType=VARCHAR}, + api_path = #{apiPath,jdbcType=VARCHAR}, + prefix = #{prefix,jdbcType=VARCHAR}, + api_alias = #{apiAlias,jdbcType=VARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/GUserSetMapper.xml b/src/main/resources/mapper/GUserSetMapper.xml new file mode 100644 index 0000000..1940f5f --- /dev/null +++ b/src/main/resources/mapper/GUserSetMapper.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + id, app_id, store_id, store_name, merchant_name, token, ip, nofiy_url, public_key, + private_key, create_time, update_time + + + + delete from g_user_set + where id = #{id,jdbcType=INTEGER} + + + insert into g_user_set (id, app_id, store_id, + store_name, merchant_name, token, + ip, nofiy_url, public_key, + private_key, create_time, update_time + ) + values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, + #{storeName,jdbcType=VARCHAR}, #{merchantName,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, + #{ip,jdbcType=VARCHAR}, #{nofiyUrl,jdbcType=VARCHAR}, #{publicKey,jdbcType=VARCHAR}, + #{privateKey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into g_user_set + + + id, + + + app_id, + + + store_id, + + + store_name, + + + merchant_name, + + + token, + + + ip, + + + nofiy_url, + + + public_key, + + + private_key, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{appId,jdbcType=VARCHAR}, + + + #{storeId,jdbcType=VARCHAR}, + + + #{storeName,jdbcType=VARCHAR}, + + + #{merchantName,jdbcType=VARCHAR}, + + + #{token,jdbcType=VARCHAR}, + + + #{ip,jdbcType=VARCHAR}, + + + #{nofiyUrl,jdbcType=VARCHAR}, + + + #{publicKey,jdbcType=VARCHAR}, + + + #{privateKey,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update g_user_set + + + app_id = #{appId,jdbcType=VARCHAR}, + + + store_id = #{storeId,jdbcType=VARCHAR}, + + + store_name = #{storeName,jdbcType=VARCHAR}, + + + merchant_name = #{merchantName,jdbcType=VARCHAR}, + + + token = #{token,jdbcType=VARCHAR}, + + + ip = #{ip,jdbcType=VARCHAR}, + + + nofiy_url = #{nofiyUrl,jdbcType=VARCHAR}, + + + public_key = #{publicKey,jdbcType=VARCHAR}, + + + private_key = #{privateKey,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update g_user_set + set app_id = #{appId,jdbcType=VARCHAR}, + store_id = #{storeId,jdbcType=VARCHAR}, + store_name = #{storeName,jdbcType=VARCHAR}, + merchant_name = #{merchantName,jdbcType=VARCHAR}, + token = #{token,jdbcType=VARCHAR}, + ip = #{ip,jdbcType=VARCHAR}, + nofiy_url = #{nofiyUrl,jdbcType=VARCHAR}, + public_key = #{publicKey,jdbcType=VARCHAR}, + private_key = #{privateKey,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntAppMapper.xml b/src/main/resources/mapper/MntAppMapper.xml new file mode 100644 index 0000000..9e911b0 --- /dev/null +++ b/src/main/resources/mapper/MntAppMapper.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + app_id, name, upload_path, deploy_path, backup_path, port, start_script, deploy_script, + create_by, update_by, create_time, update_time + + + + delete from mnt_app + where app_id = #{appId,jdbcType=BIGINT} + + + insert into mnt_app (app_id, name, upload_path, + deploy_path, backup_path, port, + start_script, deploy_script, create_by, + update_by, create_time, update_time + ) + values (#{appId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{uploadPath,jdbcType=VARCHAR}, + #{deployPath,jdbcType=VARCHAR}, #{backupPath,jdbcType=VARCHAR}, #{port,jdbcType=INTEGER}, + #{startScript,jdbcType=VARCHAR}, #{deployScript,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into mnt_app + + + app_id, + + + name, + + + upload_path, + + + deploy_path, + + + backup_path, + + + port, + + + start_script, + + + deploy_script, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{appId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{uploadPath,jdbcType=VARCHAR}, + + + #{deployPath,jdbcType=VARCHAR}, + + + #{backupPath,jdbcType=VARCHAR}, + + + #{port,jdbcType=INTEGER}, + + + #{startScript,jdbcType=VARCHAR}, + + + #{deployScript,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update mnt_app + + + name = #{name,jdbcType=VARCHAR}, + + + upload_path = #{uploadPath,jdbcType=VARCHAR}, + + + deploy_path = #{deployPath,jdbcType=VARCHAR}, + + + backup_path = #{backupPath,jdbcType=VARCHAR}, + + + port = #{port,jdbcType=INTEGER}, + + + start_script = #{startScript,jdbcType=VARCHAR}, + + + deploy_script = #{deployScript,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where app_id = #{appId,jdbcType=BIGINT} + + + update mnt_app + set name = #{name,jdbcType=VARCHAR}, + upload_path = #{uploadPath,jdbcType=VARCHAR}, + deploy_path = #{deployPath,jdbcType=VARCHAR}, + backup_path = #{backupPath,jdbcType=VARCHAR}, + port = #{port,jdbcType=INTEGER}, + start_script = #{startScript,jdbcType=VARCHAR}, + deploy_script = #{deployScript,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where app_id = #{appId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntDatabaseMapper.xml b/src/main/resources/mapper/MntDatabaseMapper.xml new file mode 100644 index 0000000..b15b917 --- /dev/null +++ b/src/main/resources/mapper/MntDatabaseMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + db_id, name, jdbc_url, user_name, pwd, create_by, update_by, create_time, update_time + + + + delete from mnt_database + where db_id = #{dbId,jdbcType=VARCHAR} + + + insert into mnt_database (db_id, name, jdbc_url, + user_name, pwd, create_by, + update_by, create_time, update_time + ) + values (#{dbId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{jdbcUrl,jdbcType=VARCHAR}, + #{userName,jdbcType=VARCHAR}, #{pwd,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into mnt_database + + + db_id, + + + name, + + + jdbc_url, + + + user_name, + + + pwd, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{dbId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{jdbcUrl,jdbcType=VARCHAR}, + + + #{userName,jdbcType=VARCHAR}, + + + #{pwd,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update mnt_database + + + name = #{name,jdbcType=VARCHAR}, + + + jdbc_url = #{jdbcUrl,jdbcType=VARCHAR}, + + + user_name = #{userName,jdbcType=VARCHAR}, + + + pwd = #{pwd,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where db_id = #{dbId,jdbcType=VARCHAR} + + + update mnt_database + set name = #{name,jdbcType=VARCHAR}, + jdbc_url = #{jdbcUrl,jdbcType=VARCHAR}, + user_name = #{userName,jdbcType=VARCHAR}, + pwd = #{pwd,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where db_id = #{dbId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntDeployHistoryMapper.xml b/src/main/resources/mapper/MntDeployHistoryMapper.xml new file mode 100644 index 0000000..ab87493 --- /dev/null +++ b/src/main/resources/mapper/MntDeployHistoryMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + history_id, app_name, deploy_date, deploy_user, ip, deploy_id + + + + delete from mnt_deploy_history + where history_id = #{historyId,jdbcType=VARCHAR} + + + insert into mnt_deploy_history (history_id, app_name, deploy_date, + deploy_user, ip, deploy_id + ) + values (#{historyId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{deployDate,jdbcType=TIMESTAMP}, + #{deployUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{deployId,jdbcType=BIGINT} + ) + + + insert into mnt_deploy_history + + + history_id, + + + app_name, + + + deploy_date, + + + deploy_user, + + + ip, + + + deploy_id, + + + + + #{historyId,jdbcType=VARCHAR}, + + + #{appName,jdbcType=VARCHAR}, + + + #{deployDate,jdbcType=TIMESTAMP}, + + + #{deployUser,jdbcType=VARCHAR}, + + + #{ip,jdbcType=VARCHAR}, + + + #{deployId,jdbcType=BIGINT}, + + + + + update mnt_deploy_history + + + app_name = #{appName,jdbcType=VARCHAR}, + + + deploy_date = #{deployDate,jdbcType=TIMESTAMP}, + + + deploy_user = #{deployUser,jdbcType=VARCHAR}, + + + ip = #{ip,jdbcType=VARCHAR}, + + + deploy_id = #{deployId,jdbcType=BIGINT}, + + + where history_id = #{historyId,jdbcType=VARCHAR} + + + update mnt_deploy_history + set app_name = #{appName,jdbcType=VARCHAR}, + deploy_date = #{deployDate,jdbcType=TIMESTAMP}, + deploy_user = #{deployUser,jdbcType=VARCHAR}, + ip = #{ip,jdbcType=VARCHAR}, + deploy_id = #{deployId,jdbcType=BIGINT} + where history_id = #{historyId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntDeployMapper.xml b/src/main/resources/mapper/MntDeployMapper.xml new file mode 100644 index 0000000..3865a3f --- /dev/null +++ b/src/main/resources/mapper/MntDeployMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + deploy_id, app_id, create_by, update_by, create_time, update_time + + + + delete from mnt_deploy + where deploy_id = #{deployId,jdbcType=BIGINT} + + + insert into mnt_deploy (deploy_id, app_id, create_by, + update_by, create_time, update_time + ) + values (#{deployId,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into mnt_deploy + + + deploy_id, + + + app_id, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{deployId,jdbcType=BIGINT}, + + + #{appId,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update mnt_deploy + + + app_id = #{appId,jdbcType=BIGINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where deploy_id = #{deployId,jdbcType=BIGINT} + + + update mnt_deploy + set app_id = #{appId,jdbcType=BIGINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where deploy_id = #{deployId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntDeployServerMapper.xml b/src/main/resources/mapper/MntDeployServerMapper.xml new file mode 100644 index 0000000..bbfd022 --- /dev/null +++ b/src/main/resources/mapper/MntDeployServerMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + delete from mnt_deploy_server + where deploy_id = #{deployId,jdbcType=BIGINT} + and server_id = #{serverId,jdbcType=BIGINT} + + + insert into mnt_deploy_server (deploy_id, server_id) + values (#{deployId,jdbcType=BIGINT}, #{serverId,jdbcType=BIGINT}) + + + insert into mnt_deploy_server + + + deploy_id, + + + server_id, + + + + + #{deployId,jdbcType=BIGINT}, + + + #{serverId,jdbcType=BIGINT}, + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/MntServerMapper.xml b/src/main/resources/mapper/MntServerMapper.xml new file mode 100644 index 0000000..dc496cc --- /dev/null +++ b/src/main/resources/mapper/MntServerMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + server_id, account, ip, name, password, port, create_by, update_by, create_time, + update_time + + + + delete from mnt_server + where server_id = #{serverId,jdbcType=BIGINT} + + + insert into mnt_server (server_id, account, ip, + name, password, port, + create_by, update_by, create_time, + update_time) + values (#{serverId,jdbcType=BIGINT}, #{account,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{port,jdbcType=INTEGER}, + #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into mnt_server + + + server_id, + + + account, + + + ip, + + + name, + + + password, + + + port, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{serverId,jdbcType=BIGINT}, + + + #{account,jdbcType=VARCHAR}, + + + #{ip,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{port,jdbcType=INTEGER}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update mnt_server + + + account = #{account,jdbcType=VARCHAR}, + + + ip = #{ip,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + port = #{port,jdbcType=INTEGER}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where server_id = #{serverId,jdbcType=BIGINT} + + + update mnt_server + set account = #{account,jdbcType=VARCHAR}, + ip = #{ip,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + port = #{port,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where server_id = #{serverId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ShopUserDutyDetailMapper.xml b/src/main/resources/mapper/ShopUserDutyDetailMapper.xml new file mode 100644 index 0000000..29eec2c --- /dev/null +++ b/src/main/resources/mapper/ShopUserDutyDetailMapper.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + id, duty_id, product_id, product_name, sku_id, sku_name, num, amount + + + + + + delete from tb_shop_user_duty_detail + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_user_duty_detail (id, duty_id, product_id, + product_name, sku_id, sku_name, + num, amount) + values (#{id,jdbcType=INTEGER}, #{dutyId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, + #{productName,jdbcType=VARCHAR}, #{skuId,jdbcType=INTEGER}, #{skuName,jdbcType=VARCHAR}, + #{num,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}) + + + insert into tb_shop_user_duty_detail + + + id, + + + duty_id, + + + product_id, + + + product_name, + + + sku_id, + + + sku_name, + + + num, + + + amount, + + + + + #{id,jdbcType=INTEGER}, + + + #{dutyId,jdbcType=INTEGER}, + + + #{productId,jdbcType=INTEGER}, + + + #{productName,jdbcType=VARCHAR}, + + + #{skuId,jdbcType=INTEGER}, + + + #{skuName,jdbcType=VARCHAR}, + + + #{num,jdbcType=INTEGER}, + + + #{amount,jdbcType=DECIMAL}, + + + + + INSERT INTO tb_shop_user_duty_detail (id, duty_id, product_id, + product_name, sku_id, sku_name, + num, amount) VALUES + + (#{item.id},#{item.dutyId},#{item.productId},#{item.productName},#{item.skuId},#{item.skuName},#{item.num},#{item.amount}) + + + + update tb_shop_user_duty_detail + + + duty_id = #{dutyId,jdbcType=INTEGER}, + + + product_id = #{productId,jdbcType=INTEGER}, + + + product_name = #{productName,jdbcType=VARCHAR}, + + + sku_id = #{skuId,jdbcType=INTEGER}, + + + sku_name = #{skuName,jdbcType=VARCHAR}, + + + num = #{num,jdbcType=INTEGER}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user_duty_detail + set duty_id = #{dutyId,jdbcType=INTEGER}, + product_id = #{productId,jdbcType=INTEGER}, + product_name = #{productName,jdbcType=VARCHAR}, + sku_id = #{skuId,jdbcType=INTEGER}, + sku_name = #{skuName,jdbcType=VARCHAR}, + num = #{num,jdbcType=INTEGER}, + amount = #{amount,jdbcType=DECIMAL} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ShopUserDutyMapper.xml b/src/main/resources/mapper/ShopUserDutyMapper.xml new file mode 100644 index 0000000..1b51f23 --- /dev/null +++ b/src/main/resources/mapper/ShopUserDutyMapper.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id, user_id, login_time, order_num, amount, login_out_time, user_name, status, income_amount, + shop_id, petty_cash, cash_amount, hand_amount, equipment,return_amount,token_id,trade_day,type + + + + + + + + delete from tb_shop_user_duty + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_user_duty (id, user_id, login_time, + order_num, amount, login_out_time, + user_name, status, income_amount, + shop_id, petty_cash, cash_amount, + hand_amount, equipment,return_amount,token_id,trade_day,type) + values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{loginTime,jdbcType=TIMESTAMP}, + #{orderNum,jdbcType=INTEGER}, #{amount,jdbcType=VARCHAR}, #{loginOutTime,jdbcType=TIMESTAMP}, + #{userName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{incomeAmount,jdbcType=DECIMAL}, + #{shopId,jdbcType=INTEGER}, #{pettyCash,jdbcType=DECIMAL}, #{cashAmount,jdbcType=DECIMAL}, + #{handAmount,jdbcType=DECIMAL}, #{equipment,jdbcType=VARCHAR}, #{returnAmount,jdbcType=DECIMAL},#{tokenId,jdbcType=INTEGER},#{tradeDay,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR}) + + + insert into tb_shop_user_duty + + + id, + + + user_id, + + + login_time, + + + order_num, + + + amount, + + + login_out_time, + + + user_name, + + + status, + + + income_amount, + + + shop_id, + + + petty_cash, + + + cash_amount, + + + hand_amount, + + + equipment, + + + + + #{id,jdbcType=INTEGER}, + + + #{userId,jdbcType=INTEGER}, + + + #{loginTime,jdbcType=TIMESTAMP}, + + + #{orderNum,jdbcType=INTEGER}, + + + #{amount,jdbcType=VARCHAR}, + + + #{loginOutTime,jdbcType=TIMESTAMP}, + + + #{userName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{incomeAmount,jdbcType=DECIMAL}, + + + #{shopId,jdbcType=INTEGER}, + + + #{pettyCash,jdbcType=DECIMAL}, + + + #{cashAmount,jdbcType=DECIMAL}, + + + #{handAmount,jdbcType=DECIMAL}, + + + #{equipment,jdbcType=VARCHAR}, + + + + + update tb_shop_user_duty + + + user_id = #{userId,jdbcType=INTEGER}, + + + login_time = #{loginTime,jdbcType=TIMESTAMP}, + + + order_num = #{orderNum,jdbcType=INTEGER}, + + + amount = #{amount,jdbcType=VARCHAR}, + + + login_out_time = #{loginOutTime,jdbcType=TIMESTAMP}, + + + user_name = #{userName,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + income_amount = #{incomeAmount,jdbcType=DECIMAL}, + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + petty_cash = #{pettyCash,jdbcType=DECIMAL}, + + + cash_amount = #{cashAmount,jdbcType=DECIMAL}, + + + hand_amount = #{handAmount,jdbcType=DECIMAL}, + + + equipment = #{equipment,jdbcType=VARCHAR}, + + + return_amount = #{returnAmount,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user_duty + set user_id = #{userId,jdbcType=INTEGER}, + login_time = #{loginTime,jdbcType=TIMESTAMP}, + order_num = #{orderNum,jdbcType=INTEGER}, + amount = #{amount,jdbcType=VARCHAR}, + login_out_time = #{loginOutTime,jdbcType=TIMESTAMP}, + user_name = #{userName,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + income_amount = #{incomeAmount,jdbcType=DECIMAL}, + shop_id = #{shopId,jdbcType=INTEGER}, + petty_cash = #{pettyCash,jdbcType=DECIMAL}, + cash_amount = #{cashAmount,jdbcType=DECIMAL}, + hand_amount = #{handAmount,jdbcType=DECIMAL}, + equipment = #{equipment,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user_duty set status = '1' and login_out_time = now() where token_id = #{tokenId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ShopUserDutyPayMapper.xml b/src/main/resources/mapper/ShopUserDutyPayMapper.xml new file mode 100644 index 0000000..1878e3b --- /dev/null +++ b/src/main/resources/mapper/ShopUserDutyPayMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + id, duty_id, type, amount + + + + + delete from tb_shop_user_duty_pay + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_user_duty_pay (id, duty_id, type, + amount) + values (#{id,jdbcType=INTEGER}, #{dutyId,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, + #{amount,jdbcType=DECIMAL}) + + + insert into tb_shop_user_duty_pay + + + id, + + + duty_id, + + + type, + + + amount, + + + + + #{id,jdbcType=INTEGER}, + + + #{dutyId,jdbcType=INTEGER}, + + + #{type,jdbcType=VARCHAR}, + + + #{amount,jdbcType=DECIMAL}, + + + + + update tb_shop_user_duty_pay + + + duty_id = #{dutyId,jdbcType=INTEGER}, + + + type = #{type,jdbcType=VARCHAR}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user_duty_pay + set duty_id = #{dutyId,jdbcType=INTEGER}, + type = #{type,jdbcType=VARCHAR}, + amount = #{amount,jdbcType=DECIMAL} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysDeptMapper.xml b/src/main/resources/mapper/SysDeptMapper.xml new file mode 100644 index 0000000..a6609be --- /dev/null +++ b/src/main/resources/mapper/SysDeptMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + dept_id, pid, sub_count, name, dept_sort, enabled, create_by, update_by, create_time, + update_time + + + + delete from sys_dept + where dept_id = #{deptId,jdbcType=BIGINT} + + + insert into sys_dept (dept_id, pid, sub_count, + name, dept_sort, enabled, + create_by, update_by, create_time, + update_time) + values (#{deptId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{deptSort,jdbcType=INTEGER}, #{enabled,jdbcType=BIT}, + #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_dept + + + dept_id, + + + pid, + + + sub_count, + + + name, + + + dept_sort, + + + enabled, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{deptId,jdbcType=BIGINT}, + + + #{pid,jdbcType=BIGINT}, + + + #{subCount,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{deptSort,jdbcType=INTEGER}, + + + #{enabled,jdbcType=BIT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_dept + + + pid = #{pid,jdbcType=BIGINT}, + + + sub_count = #{subCount,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + dept_sort = #{deptSort,jdbcType=INTEGER}, + + + enabled = #{enabled,jdbcType=BIT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where dept_id = #{deptId,jdbcType=BIGINT} + + + update sys_dept + set pid = #{pid,jdbcType=BIGINT}, + sub_count = #{subCount,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + dept_sort = #{deptSort,jdbcType=INTEGER}, + enabled = #{enabled,jdbcType=BIT}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where dept_id = #{deptId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysDictDetailMapper.xml b/src/main/resources/mapper/SysDictDetailMapper.xml new file mode 100644 index 0000000..273765a --- /dev/null +++ b/src/main/resources/mapper/SysDictDetailMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + detail_id, dict_id, label, value, dict_sort, create_by, update_by, create_time, update_time + + + + delete from sys_dict_detail + where detail_id = #{detailId,jdbcType=BIGINT} + + + insert into sys_dict_detail (detail_id, dict_id, label, + value, dict_sort, create_by, + update_by, create_time, update_time + ) + values (#{detailId,jdbcType=BIGINT}, #{dictId,jdbcType=BIGINT}, #{label,jdbcType=VARCHAR}, + #{value,jdbcType=VARCHAR}, #{dictSort,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into sys_dict_detail + + + detail_id, + + + dict_id, + + + label, + + + value, + + + dict_sort, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{detailId,jdbcType=BIGINT}, + + + #{dictId,jdbcType=BIGINT}, + + + #{label,jdbcType=VARCHAR}, + + + #{value,jdbcType=VARCHAR}, + + + #{dictSort,jdbcType=INTEGER}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_dict_detail + + + dict_id = #{dictId,jdbcType=BIGINT}, + + + label = #{label,jdbcType=VARCHAR}, + + + value = #{value,jdbcType=VARCHAR}, + + + dict_sort = #{dictSort,jdbcType=INTEGER}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where detail_id = #{detailId,jdbcType=BIGINT} + + + update sys_dict_detail + set dict_id = #{dictId,jdbcType=BIGINT}, + label = #{label,jdbcType=VARCHAR}, + value = #{value,jdbcType=VARCHAR}, + dict_sort = #{dictSort,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where detail_id = #{detailId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysDictMapper.xml b/src/main/resources/mapper/SysDictMapper.xml new file mode 100644 index 0000000..f1d271e --- /dev/null +++ b/src/main/resources/mapper/SysDictMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + dict_id, name, description, create_by, update_by, create_time, update_time + + + + delete from sys_dict + where dict_id = #{dictId,jdbcType=BIGINT} + + + insert into sys_dict (dict_id, name, description, + create_by, update_by, create_time, + update_time) + values (#{dictId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_dict + + + dict_id, + + + name, + + + description, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{dictId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_dict + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where dict_id = #{dictId,jdbcType=BIGINT} + + + update sys_dict + set name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where dict_id = #{dictId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysJobMapper.xml b/src/main/resources/mapper/SysJobMapper.xml new file mode 100644 index 0000000..085d412 --- /dev/null +++ b/src/main/resources/mapper/SysJobMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + job_id, name, enabled, job_sort, create_by, update_by, create_time, update_time + + + + delete from sys_job + where job_id = #{jobId,jdbcType=BIGINT} + + + insert into sys_job (job_id, name, enabled, + job_sort, create_by, update_by, + create_time, update_time) + values (#{jobId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, + #{jobSort,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_job + + + job_id, + + + name, + + + enabled, + + + job_sort, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{jobId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{enabled,jdbcType=BIT}, + + + #{jobSort,jdbcType=INTEGER}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_job + + + name = #{name,jdbcType=VARCHAR}, + + + enabled = #{enabled,jdbcType=BIT}, + + + job_sort = #{jobSort,jdbcType=INTEGER}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where job_id = #{jobId,jdbcType=BIGINT} + + + update sys_job + set name = #{name,jdbcType=VARCHAR}, + enabled = #{enabled,jdbcType=BIT}, + job_sort = #{jobSort,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where job_id = #{jobId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysLogMapper.xml b/src/main/resources/mapper/SysLogMapper.xml new file mode 100644 index 0000000..8a954be --- /dev/null +++ b/src/main/resources/mapper/SysLogMapper.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + log_id, description, log_type, method, request_ip, time, username, address, browser, + create_time + + + params, exception_detail + + + + delete from sys_log + where log_id = #{logId,jdbcType=BIGINT} + + + insert into sys_log (log_id, description, log_type, + method, request_ip, time, + username, address, browser, + create_time, params, exception_detail + ) + values (#{logId,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{logType,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{requestIp,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, + #{username,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{browser,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{params,jdbcType=LONGVARCHAR}, #{exceptionDetail,jdbcType=LONGVARCHAR} + ) + + + insert into sys_log + + + log_id, + + + description, + + + log_type, + + + method, + + + request_ip, + + + time, + + + username, + + + address, + + + browser, + + + create_time, + + + params, + + + exception_detail, + + + + + #{logId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{logType,jdbcType=VARCHAR}, + + + #{method,jdbcType=VARCHAR}, + + + #{requestIp,jdbcType=VARCHAR}, + + + #{time,jdbcType=BIGINT}, + + + #{username,jdbcType=VARCHAR}, + + + #{address,jdbcType=VARCHAR}, + + + #{browser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{params,jdbcType=LONGVARCHAR}, + + + #{exceptionDetail,jdbcType=LONGVARCHAR}, + + + + + update sys_log + + + description = #{description,jdbcType=VARCHAR}, + + + log_type = #{logType,jdbcType=VARCHAR}, + + + method = #{method,jdbcType=VARCHAR}, + + + request_ip = #{requestIp,jdbcType=VARCHAR}, + + + time = #{time,jdbcType=BIGINT}, + + + username = #{username,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + browser = #{browser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + params = #{params,jdbcType=LONGVARCHAR}, + + + exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR}, + + + where log_id = #{logId,jdbcType=BIGINT} + + + update sys_log + set description = #{description,jdbcType=VARCHAR}, + log_type = #{logType,jdbcType=VARCHAR}, + method = #{method,jdbcType=VARCHAR}, + request_ip = #{requestIp,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT}, + username = #{username,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + browser = #{browser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + params = #{params,jdbcType=LONGVARCHAR}, + exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR} + where log_id = #{logId,jdbcType=BIGINT} + + + update sys_log + set description = #{description,jdbcType=VARCHAR}, + log_type = #{logType,jdbcType=VARCHAR}, + method = #{method,jdbcType=VARCHAR}, + request_ip = #{requestIp,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT}, + username = #{username,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + browser = #{browser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where log_id = #{logId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysMenuMapper.xml b/src/main/resources/mapper/SysMenuMapper.xml new file mode 100644 index 0000000..868e016 --- /dev/null +++ b/src/main/resources/mapper/SysMenuMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + menu_id, pid, sub_count, type, title, name, component, menu_sort, icon, path, i_frame, + cache, hidden, permission, create_by, update_by, create_time, update_time, active_menu + + + + delete from sys_menu + where menu_id = #{menuId,jdbcType=BIGINT} + + + insert into sys_menu (menu_id, pid, sub_count, + type, title, name, + component, menu_sort, icon, + path, i_frame, cache, hidden, + permission, create_by, update_by, + create_time, update_time, active_menu + ) + values (#{menuId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER}, + #{type,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{component,jdbcType=VARCHAR}, #{menuSort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, + #{path,jdbcType=VARCHAR}, #{iFrame,jdbcType=BIT}, #{cache,jdbcType=BIT}, #{hidden,jdbcType=BIT}, + #{permission,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{activeMenu,jdbcType=VARCHAR} + ) + + + insert into sys_menu + + + menu_id, + + + pid, + + + sub_count, + + + type, + + + title, + + + name, + + + component, + + + menu_sort, + + + icon, + + + path, + + + i_frame, + + + cache, + + + hidden, + + + permission, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + active_menu, + + + + + #{menuId,jdbcType=BIGINT}, + + + #{pid,jdbcType=BIGINT}, + + + #{subCount,jdbcType=INTEGER}, + + + #{type,jdbcType=INTEGER}, + + + #{title,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{component,jdbcType=VARCHAR}, + + + #{menuSort,jdbcType=INTEGER}, + + + #{icon,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{iFrame,jdbcType=BIT}, + + + #{cache,jdbcType=BIT}, + + + #{hidden,jdbcType=BIT}, + + + #{permission,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{activeMenu,jdbcType=VARCHAR}, + + + + + update sys_menu + + + pid = #{pid,jdbcType=BIGINT}, + + + sub_count = #{subCount,jdbcType=INTEGER}, + + + type = #{type,jdbcType=INTEGER}, + + + title = #{title,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + component = #{component,jdbcType=VARCHAR}, + + + menu_sort = #{menuSort,jdbcType=INTEGER}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + path = #{path,jdbcType=VARCHAR}, + + + i_frame = #{iFrame,jdbcType=BIT}, + + + cache = #{cache,jdbcType=BIT}, + + + hidden = #{hidden,jdbcType=BIT}, + + + permission = #{permission,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + active_menu = #{activeMenu,jdbcType=VARCHAR}, + + + where menu_id = #{menuId,jdbcType=BIGINT} + + + update sys_menu + set pid = #{pid,jdbcType=BIGINT}, + sub_count = #{subCount,jdbcType=INTEGER}, + type = #{type,jdbcType=INTEGER}, + title = #{title,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + component = #{component,jdbcType=VARCHAR}, + menu_sort = #{menuSort,jdbcType=INTEGER}, + icon = #{icon,jdbcType=VARCHAR}, + path = #{path,jdbcType=VARCHAR}, + i_frame = #{iFrame,jdbcType=BIT}, + cache = #{cache,jdbcType=BIT}, + hidden = #{hidden,jdbcType=BIT}, + permission = #{permission,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + active_menu = #{activeMenu,jdbcType=VARCHAR} + where menu_id = #{menuId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysQuartzJobMapper.xml b/src/main/resources/mapper/SysQuartzJobMapper.xml new file mode 100644 index 0000000..2406d33 --- /dev/null +++ b/src/main/resources/mapper/SysQuartzJobMapper.xml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + job_id, bean_name, cron_expression, is_pause, job_name, method_name, params, description, + person_in_charge, email, sub_task, pause_after_failure, create_by, update_by, create_time, + update_time + + + + delete from sys_quartz_job + where job_id = #{jobId,jdbcType=BIGINT} + + + insert into sys_quartz_job (job_id, bean_name, cron_expression, + is_pause, job_name, method_name, + params, description, person_in_charge, + email, sub_task, pause_after_failure, + create_by, update_by, create_time, + update_time) + values (#{jobId,jdbcType=BIGINT}, #{beanName,jdbcType=VARCHAR}, #{cronExpression,jdbcType=VARCHAR}, + #{isPause,jdbcType=BIT}, #{jobName,jdbcType=VARCHAR}, #{methodName,jdbcType=VARCHAR}, + #{params,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{personInCharge,jdbcType=VARCHAR}, + #{email,jdbcType=VARCHAR}, #{subTask,jdbcType=VARCHAR}, #{pauseAfterFailure,jdbcType=BIT}, + #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_quartz_job + + + job_id, + + + bean_name, + + + cron_expression, + + + is_pause, + + + job_name, + + + method_name, + + + params, + + + description, + + + person_in_charge, + + + email, + + + sub_task, + + + pause_after_failure, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{jobId,jdbcType=BIGINT}, + + + #{beanName,jdbcType=VARCHAR}, + + + #{cronExpression,jdbcType=VARCHAR}, + + + #{isPause,jdbcType=BIT}, + + + #{jobName,jdbcType=VARCHAR}, + + + #{methodName,jdbcType=VARCHAR}, + + + #{params,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{personInCharge,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{subTask,jdbcType=VARCHAR}, + + + #{pauseAfterFailure,jdbcType=BIT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_quartz_job + + + bean_name = #{beanName,jdbcType=VARCHAR}, + + + cron_expression = #{cronExpression,jdbcType=VARCHAR}, + + + is_pause = #{isPause,jdbcType=BIT}, + + + job_name = #{jobName,jdbcType=VARCHAR}, + + + method_name = #{methodName,jdbcType=VARCHAR}, + + + params = #{params,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + person_in_charge = #{personInCharge,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + sub_task = #{subTask,jdbcType=VARCHAR}, + + + pause_after_failure = #{pauseAfterFailure,jdbcType=BIT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where job_id = #{jobId,jdbcType=BIGINT} + + + update sys_quartz_job + set bean_name = #{beanName,jdbcType=VARCHAR}, + cron_expression = #{cronExpression,jdbcType=VARCHAR}, + is_pause = #{isPause,jdbcType=BIT}, + job_name = #{jobName,jdbcType=VARCHAR}, + method_name = #{methodName,jdbcType=VARCHAR}, + params = #{params,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + person_in_charge = #{personInCharge,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + sub_task = #{subTask,jdbcType=VARCHAR}, + pause_after_failure = #{pauseAfterFailure,jdbcType=BIT}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where job_id = #{jobId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysQuartzLogMapper.xml b/src/main/resources/mapper/SysQuartzLogMapper.xml new file mode 100644 index 0000000..ebb3fea --- /dev/null +++ b/src/main/resources/mapper/SysQuartzLogMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + log_id, bean_name, create_time, cron_expression, is_success, job_name, method_name, + params, time + + + exception_detail + + + + delete from sys_quartz_log + where log_id = #{logId,jdbcType=BIGINT} + + + insert into sys_quartz_log (log_id, bean_name, create_time, + cron_expression, is_success, job_name, + method_name, params, time, + exception_detail) + values (#{logId,jdbcType=BIGINT}, #{beanName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{cronExpression,jdbcType=VARCHAR}, #{isSuccess,jdbcType=BIT}, #{jobName,jdbcType=VARCHAR}, + #{methodName,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, + #{exceptionDetail,jdbcType=LONGVARCHAR}) + + + insert into sys_quartz_log + + + log_id, + + + bean_name, + + + create_time, + + + cron_expression, + + + is_success, + + + job_name, + + + method_name, + + + params, + + + time, + + + exception_detail, + + + + + #{logId,jdbcType=BIGINT}, + + + #{beanName,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{cronExpression,jdbcType=VARCHAR}, + + + #{isSuccess,jdbcType=BIT}, + + + #{jobName,jdbcType=VARCHAR}, + + + #{methodName,jdbcType=VARCHAR}, + + + #{params,jdbcType=VARCHAR}, + + + #{time,jdbcType=BIGINT}, + + + #{exceptionDetail,jdbcType=LONGVARCHAR}, + + + + + update sys_quartz_log + + + bean_name = #{beanName,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + cron_expression = #{cronExpression,jdbcType=VARCHAR}, + + + is_success = #{isSuccess,jdbcType=BIT}, + + + job_name = #{jobName,jdbcType=VARCHAR}, + + + method_name = #{methodName,jdbcType=VARCHAR}, + + + params = #{params,jdbcType=VARCHAR}, + + + time = #{time,jdbcType=BIGINT}, + + + exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR}, + + + where log_id = #{logId,jdbcType=BIGINT} + + + update sys_quartz_log + set bean_name = #{beanName,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + cron_expression = #{cronExpression,jdbcType=VARCHAR}, + is_success = #{isSuccess,jdbcType=BIT}, + job_name = #{jobName,jdbcType=VARCHAR}, + method_name = #{methodName,jdbcType=VARCHAR}, + params = #{params,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT}, + exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR} + where log_id = #{logId,jdbcType=BIGINT} + + + update sys_quartz_log + set bean_name = #{beanName,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + cron_expression = #{cronExpression,jdbcType=VARCHAR}, + is_success = #{isSuccess,jdbcType=BIT}, + job_name = #{jobName,jdbcType=VARCHAR}, + method_name = #{methodName,jdbcType=VARCHAR}, + params = #{params,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT} + where log_id = #{logId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysRoleMapper.xml b/src/main/resources/mapper/SysRoleMapper.xml new file mode 100644 index 0000000..a647d0b --- /dev/null +++ b/src/main/resources/mapper/SysRoleMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + role_id, name, level, description, data_scope, create_by, update_by, create_time, + update_time + + + + delete from sys_role + where role_id = #{roleId,jdbcType=BIGINT} + + + insert into sys_role (role_id, name, level, + description, data_scope, create_by, + update_by, create_time, update_time + ) + values (#{roleId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, + #{description,jdbcType=VARCHAR}, #{dataScope,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, + #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into sys_role + + + role_id, + + + name, + + + level, + + + description, + + + data_scope, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{roleId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{level,jdbcType=INTEGER}, + + + #{description,jdbcType=VARCHAR}, + + + #{dataScope,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_role + + + name = #{name,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=INTEGER}, + + + description = #{description,jdbcType=VARCHAR}, + + + data_scope = #{dataScope,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where role_id = #{roleId,jdbcType=BIGINT} + + + update sys_role + set name = #{name,jdbcType=VARCHAR}, + level = #{level,jdbcType=INTEGER}, + description = #{description,jdbcType=VARCHAR}, + data_scope = #{dataScope,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where role_id = #{roleId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysRolesDeptsMapper.xml b/src/main/resources/mapper/SysRolesDeptsMapper.xml new file mode 100644 index 0000000..68c9180 --- /dev/null +++ b/src/main/resources/mapper/SysRolesDeptsMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + delete from sys_roles_depts + where role_id = #{roleId,jdbcType=BIGINT} + and dept_id = #{deptId,jdbcType=BIGINT} + + + insert into sys_roles_depts (role_id, dept_id) + values (#{roleId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT}) + + + insert into sys_roles_depts + + + role_id, + + + dept_id, + + + + + #{roleId,jdbcType=BIGINT}, + + + #{deptId,jdbcType=BIGINT}, + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysRolesMenusMapper.xml b/src/main/resources/mapper/SysRolesMenusMapper.xml new file mode 100644 index 0000000..bde4a93 --- /dev/null +++ b/src/main/resources/mapper/SysRolesMenusMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + delete from sys_roles_menus + where menu_id = #{menuId,jdbcType=BIGINT} + and role_id = #{roleId,jdbcType=BIGINT} + + + insert into sys_roles_menus (menu_id, role_id) + values (#{menuId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}) + + + insert into sys_roles_menus + + + menu_id, + + + role_id, + + + + + #{menuId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysUserMapper.xml b/src/main/resources/mapper/SysUserMapper.xml new file mode 100644 index 0000000..16c759a --- /dev/null +++ b/src/main/resources/mapper/SysUserMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + user_id, dept_id, username, nick_name, gender, phone, email, avatar_name, avatar_path, + password, is_admin, enabled, create_by, update_by, pwd_reset_time, create_time, update_time + + + + delete from sys_user + where user_id = #{userId,jdbcType=BIGINT} + + + insert into sys_user (user_id, dept_id, username, + nick_name, gender, phone, + email, avatar_name, avatar_path, + password, is_admin, enabled, + create_by, update_by, pwd_reset_time, + create_time, update_time) + values (#{userId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, + #{nickName,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{email,jdbcType=VARCHAR}, #{avatarName,jdbcType=VARCHAR}, #{avatarPath,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{isAdmin,jdbcType=BIT}, #{enabled,jdbcType=BIGINT}, + #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{pwdResetTime,jdbcType=TIMESTAMP}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_user + + + user_id, + + + dept_id, + + + username, + + + nick_name, + + + gender, + + + phone, + + + email, + + + avatar_name, + + + avatar_path, + + + password, + + + is_admin, + + + enabled, + + + create_by, + + + update_by, + + + pwd_reset_time, + + + create_time, + + + update_time, + + + + + #{userId,jdbcType=BIGINT}, + + + #{deptId,jdbcType=BIGINT}, + + + #{username,jdbcType=VARCHAR}, + + + #{nickName,jdbcType=VARCHAR}, + + + #{gender,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{avatarName,jdbcType=VARCHAR}, + + + #{avatarPath,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{isAdmin,jdbcType=BIT}, + + + #{enabled,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{pwdResetTime,jdbcType=TIMESTAMP}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update sys_user + + + dept_id = #{deptId,jdbcType=BIGINT}, + + + username = #{username,jdbcType=VARCHAR}, + + + nick_name = #{nickName,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + avatar_name = #{avatarName,jdbcType=VARCHAR}, + + + avatar_path = #{avatarPath,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + is_admin = #{isAdmin,jdbcType=BIT}, + + + enabled = #{enabled,jdbcType=BIGINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + pwd_reset_time = #{pwdResetTime,jdbcType=TIMESTAMP}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where user_id = #{userId,jdbcType=BIGINT} + + + update sys_user + set dept_id = #{deptId,jdbcType=BIGINT}, + username = #{username,jdbcType=VARCHAR}, + nick_name = #{nickName,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + avatar_name = #{avatarName,jdbcType=VARCHAR}, + avatar_path = #{avatarPath,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + is_admin = #{isAdmin,jdbcType=BIT}, + enabled = #{enabled,jdbcType=BIGINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + pwd_reset_time = #{pwdResetTime,jdbcType=TIMESTAMP}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where user_id = #{userId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysUsersJobsMapper.xml b/src/main/resources/mapper/SysUsersJobsMapper.xml new file mode 100644 index 0000000..7fe509f --- /dev/null +++ b/src/main/resources/mapper/SysUsersJobsMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + delete from sys_users_jobs + where user_id = #{userId,jdbcType=BIGINT} + and job_id = #{jobId,jdbcType=BIGINT} + + + insert into sys_users_jobs (user_id, job_id) + values (#{userId,jdbcType=BIGINT}, #{jobId,jdbcType=BIGINT}) + + + insert into sys_users_jobs + + + user_id, + + + job_id, + + + + + #{userId,jdbcType=BIGINT}, + + + #{jobId,jdbcType=BIGINT}, + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysUsersRolesMapper.xml b/src/main/resources/mapper/SysUsersRolesMapper.xml new file mode 100644 index 0000000..34ef125 --- /dev/null +++ b/src/main/resources/mapper/SysUsersRolesMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + delete from sys_users_roles + where user_id = #{userId,jdbcType=BIGINT} + and role_id = #{roleId,jdbcType=BIGINT} + + + insert into sys_users_roles (user_id, role_id) + values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}) + + + insert into sys_users_roles + + + user_id, + + + role_id, + + + + + #{userId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbCashierCartMapper.xml b/src/main/resources/mapper/TbCashierCartMapper.xml new file mode 100644 index 0000000..4e05739 --- /dev/null +++ b/src/main/resources/mapper/TbCashierCartMapper.xml @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, master_id, order_id, ref_order_id, total_amount, product_id, cover_img, is_sku,pack_fee,is_pack,is_gift,pending_at, + sku_id, name, sale_price, number, total_number, refund_number, category_id, status, + type, merchant_id, shop_id, created_at, updated_at, user_id, table_id,pack_fee,trade_day,uuid + + + + + + + + + + + + delete from tb_cashier_cart + where id = #{id,jdbcType=INTEGER} + + + delete from tb_cashier_cart where id = #{cartId} and master_id = #{masterId} + + + delete from tb_cashier_cart where master_id = #{masterId} and shop_id = #{shopId} + and status = #{status} and trade_day = #{day} + + and uuid = #{uuid} + + + + insert into tb_cashier_cart (id, master_id, order_id, + ref_order_id, total_amount, product_id, + cover_img, is_sku, sku_id, + name, sale_price, number, + total_number, refund_number, category_id, + status, type, merchant_id, + shop_id, created_at, updated_at, pack_fee,trade_day,is_pack,is_gift,uuid + ) + values (#{id,jdbcType=INTEGER}, #{masterId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, + #{refOrderId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{productId,jdbcType=VARCHAR}, + #{coverImg,jdbcType=VARCHAR}, #{isSku,jdbcType=TINYINT}, #{skuId,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{salePrice,jdbcType=DECIMAL}, #{number,jdbcType=REAL}, + #{totalNumber,jdbcType=REAL}, #{refundNumber,jdbcType=REAL}, #{categoryId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, + #{shopId,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{packFee,jdbcType=DECIMAL} + , #{tradeDay,jdbcType=VARCHAR}, #{isPack,jdbcType=VARCHAR}, #{isGift,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR} + ) + + + insert into tb_cashier_cart + + + id, + + + master_id, + + + order_id, + + + ref_order_id, + + + total_amount, + + + product_id, + + + cover_img, + + + is_sku, + + + sku_id, + + + name, + + + sale_price, + + + number, + + + total_number, + + + refund_number, + + + category_id, + + + status, + + + type, + + + merchant_id, + + + shop_id, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{masterId,jdbcType=VARCHAR}, + + + #{orderId,jdbcType=VARCHAR}, + + + #{refOrderId,jdbcType=VARCHAR}, + + + #{totalAmount,jdbcType=DECIMAL}, + + + #{productId,jdbcType=VARCHAR}, + + + #{coverImg,jdbcType=VARCHAR}, + + + #{isSku,jdbcType=TINYINT}, + + + #{skuId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{salePrice,jdbcType=DECIMAL}, + + + #{number,jdbcType=REAL}, + + + #{totalNumber,jdbcType=REAL}, + + + #{refundNumber,jdbcType=REAL}, + + + #{categoryId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_cashier_cart + + + master_id = #{masterId,jdbcType=VARCHAR}, + + + order_id = #{orderId,jdbcType=VARCHAR}, + + + ref_order_id = #{refOrderId,jdbcType=VARCHAR}, + + + total_amount = #{totalAmount,jdbcType=DECIMAL}, + + + product_id = #{productId,jdbcType=VARCHAR}, + + + cover_img = #{coverImg,jdbcType=VARCHAR}, + + + is_sku = #{isSku,jdbcType=TINYINT}, + + + sku_id = #{skuId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + sale_price = #{salePrice,jdbcType=DECIMAL}, + + + pack_fee = #{packFee,jdbcType=DECIMAL}, + + + number = #{number,jdbcType=REAL}, + + + total_number = #{totalNumber,jdbcType=REAL}, + + + refund_number = #{refundNumber,jdbcType=REAL}, + + + category_id = #{categoryId,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + pending_at = #{pendingAt,jdbcType=BIGINT}, + + + is_gift = #{isGift,jdbcType=BIGINT}, + + + is_pack = #{isPack,jdbcType=VARCHAR}, + + + uuid = #{uuid,jdbcType=VARCHAR}, + + + table_id = #{tableId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_cashier_cart + set master_id = #{masterId,jdbcType=VARCHAR}, + order_id = #{orderId,jdbcType=VARCHAR}, + ref_order_id = #{refOrderId,jdbcType=VARCHAR}, + total_amount = #{totalAmount,jdbcType=DECIMAL}, + product_id = #{productId,jdbcType=VARCHAR}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + is_sku = #{isSku,jdbcType=TINYINT}, + sku_id = #{skuId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + sale_price = #{salePrice,jdbcType=DECIMAL}, + number = #{number,jdbcType=REAL}, + total_number = #{totalNumber,jdbcType=REAL}, + refund_number = #{refundNumber,jdbcType=REAL}, + category_id = #{categoryId,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + update tb_cashier_cart set status = #{status} where id = #{id} + + + update tb_cashier_cart set status = #{status} , uuid = #{uuid}where shop_id = #{shopId} and master_id = #{masterId} + and trade_day = #{day} and status = 'refund' + + + + update tb_cashier_cart set `status`=#{status} where order_id=#{orderId} and `status`='create' + + + update tb_cashier_cart set is_pack = #{status} where master_id = #{maskerId} and trade_day = #{day} and shop_id = #{shopId} + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbDeviceOperateInfoMapper.xml b/src/main/resources/mapper/TbDeviceOperateInfoMapper.xml new file mode 100644 index 0000000..bd36c49 --- /dev/null +++ b/src/main/resources/mapper/TbDeviceOperateInfoMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + id, deviceNo, type, shop_id, createTime, remark + + + + delete from tb_device_operate_info + where id = #{id,jdbcType=INTEGER} + + + insert into tb_device_operate_info (id, deviceNo, type, + shop_id, createTime, remark + ) + values (#{id,jdbcType=INTEGER}, #{deviceno,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{shopId,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR} + ) + + + insert into tb_device_operate_info + + + id, + + + deviceNo, + + + type, + + + shop_id, + + + createTime, + + + remark, + + + + + #{id,jdbcType=INTEGER}, + + + #{deviceno,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + + + update tb_device_operate_info + + + deviceNo = #{deviceno,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + createTime = #{createtime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_device_operate_info + set deviceNo = #{deviceno,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + createTime = #{createtime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbDeviceStockMapper.xml b/src/main/resources/mapper/TbDeviceStockMapper.xml new file mode 100644 index 0000000..a4e401e --- /dev/null +++ b/src/main/resources/mapper/TbDeviceStockMapper.xml @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, code, snNo, orderNo, price, type, groupNo, buyMercName, buyMercId, actMercName, + actMercId, status, createTime, createBy, delFlag, remarks, updateTime, deviceNo, + belongUserId, extractUserId, roleCode, inStockTime, transferStatus, bindTime + + + + delete from tb_device_stock + where id = #{id,jdbcType=INTEGER} + + + insert into tb_device_stock (id, code, snNo, + orderNo, price, type, + groupNo, buyMercName, buyMercId, + actMercName, actMercId, status, + createTime, createBy, delFlag, + remarks, updateTime, deviceNo, + belongUserId, extractUserId, roleCode, + inStockTime, transferStatus, bindTime + ) + values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{snno,jdbcType=VARCHAR}, + #{orderno,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{type,jdbcType=VARCHAR}, + #{groupno,jdbcType=VARCHAR}, #{buymercname,jdbcType=VARCHAR}, #{buymercid,jdbcType=VARCHAR}, + #{actmercname,jdbcType=VARCHAR}, #{actmercid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{createtime,jdbcType=TIMESTAMP}, #{createby,jdbcType=VARCHAR}, #{delflag,jdbcType=VARCHAR}, + #{remarks,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, #{deviceno,jdbcType=VARCHAR}, + #{belonguserid,jdbcType=INTEGER}, #{extractuserid,jdbcType=INTEGER}, #{rolecode,jdbcType=VARCHAR}, + #{instocktime,jdbcType=TIMESTAMP}, #{transferstatus,jdbcType=VARCHAR}, #{bindtime,jdbcType=TIMESTAMP} + ) + + + insert into tb_device_stock + + + id, + + + code, + + + snNo, + + + orderNo, + + + price, + + + type, + + + groupNo, + + + buyMercName, + + + buyMercId, + + + actMercName, + + + actMercId, + + + status, + + + createTime, + + + createBy, + + + delFlag, + + + remarks, + + + updateTime, + + + deviceNo, + + + belongUserId, + + + extractUserId, + + + roleCode, + + + inStockTime, + + + transferStatus, + + + bindTime, + + + + + #{id,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{snno,jdbcType=VARCHAR}, + + + #{orderno,jdbcType=VARCHAR}, + + + #{price,jdbcType=DECIMAL}, + + + #{type,jdbcType=VARCHAR}, + + + #{groupno,jdbcType=VARCHAR}, + + + #{buymercname,jdbcType=VARCHAR}, + + + #{buymercid,jdbcType=VARCHAR}, + + + #{actmercname,jdbcType=VARCHAR}, + + + #{actmercid,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{createby,jdbcType=VARCHAR}, + + + #{delflag,jdbcType=VARCHAR}, + + + #{remarks,jdbcType=VARCHAR}, + + + #{updatetime,jdbcType=TIMESTAMP}, + + + #{deviceno,jdbcType=VARCHAR}, + + + #{belonguserid,jdbcType=INTEGER}, + + + #{extractuserid,jdbcType=INTEGER}, + + + #{rolecode,jdbcType=VARCHAR}, + + + #{instocktime,jdbcType=TIMESTAMP}, + + + #{transferstatus,jdbcType=VARCHAR}, + + + #{bindtime,jdbcType=TIMESTAMP}, + + + + + update tb_device_stock + + + code = #{code,jdbcType=VARCHAR}, + + + snNo = #{snno,jdbcType=VARCHAR}, + + + orderNo = #{orderno,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DECIMAL}, + + + type = #{type,jdbcType=VARCHAR}, + + + groupNo = #{groupno,jdbcType=VARCHAR}, + + + buyMercName = #{buymercname,jdbcType=VARCHAR}, + + + buyMercId = #{buymercid,jdbcType=VARCHAR}, + + + actMercName = #{actmercname,jdbcType=VARCHAR}, + + + actMercId = #{actmercid,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + createTime = #{createtime,jdbcType=TIMESTAMP}, + + + createBy = #{createby,jdbcType=VARCHAR}, + + + delFlag = #{delflag,jdbcType=VARCHAR}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + updateTime = #{updatetime,jdbcType=TIMESTAMP}, + + + deviceNo = #{deviceno,jdbcType=VARCHAR}, + + + belongUserId = #{belonguserid,jdbcType=INTEGER}, + + + extractUserId = #{extractuserid,jdbcType=INTEGER}, + + + roleCode = #{rolecode,jdbcType=VARCHAR}, + + + inStockTime = #{instocktime,jdbcType=TIMESTAMP}, + + + transferStatus = #{transferstatus,jdbcType=VARCHAR}, + + + bindTime = #{bindtime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_device_stock + set code = #{code,jdbcType=VARCHAR}, + snNo = #{snno,jdbcType=VARCHAR}, + orderNo = #{orderno,jdbcType=VARCHAR}, + price = #{price,jdbcType=DECIMAL}, + type = #{type,jdbcType=VARCHAR}, + groupNo = #{groupno,jdbcType=VARCHAR}, + buyMercName = #{buymercname,jdbcType=VARCHAR}, + buyMercId = #{buymercid,jdbcType=VARCHAR}, + actMercName = #{actmercname,jdbcType=VARCHAR}, + actMercId = #{actmercid,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + createTime = #{createtime,jdbcType=TIMESTAMP}, + createBy = #{createby,jdbcType=VARCHAR}, + delFlag = #{delflag,jdbcType=VARCHAR}, + remarks = #{remarks,jdbcType=VARCHAR}, + updateTime = #{updatetime,jdbcType=TIMESTAMP}, + deviceNo = #{deviceno,jdbcType=VARCHAR}, + belongUserId = #{belonguserid,jdbcType=INTEGER}, + extractUserId = #{extractuserid,jdbcType=INTEGER}, + roleCode = #{rolecode,jdbcType=VARCHAR}, + inStockTime = #{instocktime,jdbcType=TIMESTAMP}, + transferStatus = #{transferstatus,jdbcType=VARCHAR}, + bindTime = #{bindtime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbMemberInMapper.xml b/src/main/resources/mapper/TbMemberInMapper.xml new file mode 100644 index 0000000..13d4cee --- /dev/null +++ b/src/main/resources/mapper/TbMemberInMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + id, user_id, merchant_id, code, amount, status, order_no, trade_no, create_time, + update_time + + + + delete from tb_member_in + where id = #{id,jdbcType=INTEGER} + + + insert into tb_member_in (id, user_id, merchant_id, + code, amount, status, + order_no, trade_no, create_time, + update_time) + values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{merchantId,jdbcType=INTEGER}, + #{code,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, + #{orderNo,jdbcType=VARCHAR}, #{tradeNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into tb_member_in + + + id, + + + user_id, + + + merchant_id, + + + code, + + + amount, + + + status, + + + order_no, + + + trade_no, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{userId,jdbcType=INTEGER}, + + + #{merchantId,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{amount,jdbcType=DECIMAL}, + + + #{status,jdbcType=VARCHAR}, + + + #{orderNo,jdbcType=VARCHAR}, + + + #{tradeNo,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update tb_member_in + + + user_id = #{userId,jdbcType=INTEGER}, + + + merchant_id = #{merchantId,jdbcType=INTEGER}, + + + code = #{code,jdbcType=VARCHAR}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + status = #{status,jdbcType=VARCHAR}, + + + order_no = #{orderNo,jdbcType=VARCHAR}, + + + trade_no = #{tradeNo,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_member_in + set user_id = #{userId,jdbcType=INTEGER}, + merchant_id = #{merchantId,jdbcType=INTEGER}, + code = #{code,jdbcType=VARCHAR}, + amount = #{amount,jdbcType=DECIMAL}, + status = #{status,jdbcType=VARCHAR}, + order_no = #{orderNo,jdbcType=VARCHAR}, + trade_no = #{tradeNo,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbMerchantRegisterMapper.xml b/src/main/resources/mapper/TbMerchantRegisterMapper.xml new file mode 100644 index 0000000..1cdbcc9 --- /dev/null +++ b/src/main/resources/mapper/TbMerchantRegisterMapper.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, register_code, app_code, telephone, merchant_id, shop_id, type, amount, period_year, + name, address, logo, industry, industry_name, status, limit_shop_number, source_path, + created_at, updated_at + + + + delete from tb_merchant_register + where id = #{id,jdbcType=INTEGER} + + + insert into tb_merchant_register (id, register_code, app_code, + telephone, merchant_id, shop_id, + type, amount, period_year, + name, address, logo, + industry, industry_name, status, + limit_shop_number, source_path, created_at, + updated_at) + values (#{id,jdbcType=INTEGER}, #{registerCode,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, + #{telephone,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{periodYear,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, + #{industry,jdbcType=VARCHAR}, #{industryName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, + #{limitShopNumber,jdbcType=INTEGER}, #{sourcePath,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}) + + + insert into tb_merchant_register + + + id, + + + register_code, + + + app_code, + + + telephone, + + + merchant_id, + + + shop_id, + + + type, + + + amount, + + + period_year, + + + name, + + + address, + + + logo, + + + industry, + + + industry_name, + + + status, + + + limit_shop_number, + + + source_path, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{registerCode,jdbcType=VARCHAR}, + + + #{appCode,jdbcType=VARCHAR}, + + + #{telephone,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{amount,jdbcType=DECIMAL}, + + + #{periodYear,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{address,jdbcType=VARCHAR}, + + + #{logo,jdbcType=VARCHAR}, + + + #{industry,jdbcType=VARCHAR}, + + + #{industryName,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{limitShopNumber,jdbcType=INTEGER}, + + + #{sourcePath,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_merchant_register + + + register_code = #{registerCode,jdbcType=VARCHAR}, + + + app_code = #{appCode,jdbcType=VARCHAR}, + + + telephone = #{telephone,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + period_year = #{periodYear,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + logo = #{logo,jdbcType=VARCHAR}, + + + industry = #{industry,jdbcType=VARCHAR}, + + + industry_name = #{industryName,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + limit_shop_number = #{limitShopNumber,jdbcType=INTEGER}, + + + source_path = #{sourcePath,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_merchant_register + set register_code = #{registerCode,jdbcType=VARCHAR}, + app_code = #{appCode,jdbcType=VARCHAR}, + telephone = #{telephone,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + amount = #{amount,jdbcType=DECIMAL}, + period_year = #{periodYear,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + logo = #{logo,jdbcType=VARCHAR}, + industry = #{industry,jdbcType=VARCHAR}, + industry_name = #{industryName,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + limit_shop_number = #{limitShopNumber,jdbcType=INTEGER}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbMerchantThirdApplyMapper.xml b/src/main/resources/mapper/TbMerchantThirdApplyMapper.xml new file mode 100644 index 0000000..7b0b2cc --- /dev/null +++ b/src/main/resources/mapper/TbMerchantThirdApplyMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + id, type, app_id, status, pay_password, applyment_state, created_at, updated_at, + shop_id + + + app_token + + + + delete from tb_merchant_third_apply + where id = #{id,jdbcType=INTEGER} + + + insert into tb_merchant_third_apply (id, type, app_id, + status, pay_password, applyment_state, + created_at, updated_at, shop_id, + app_token) + values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, + #{status,jdbcType=TINYINT}, #{payPassword,jdbcType=VARCHAR}, #{applymentState,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{shopId,jdbcType=INTEGER}, + #{appToken,jdbcType=LONGVARCHAR}) + + + insert into tb_merchant_third_apply + + + id, + + + type, + + + app_id, + + + status, + + + pay_password, + + + applyment_state, + + + created_at, + + + updated_at, + + + shop_id, + + + app_token, + + + + + #{id,jdbcType=INTEGER}, + + + #{type,jdbcType=VARCHAR}, + + + #{appId,jdbcType=VARCHAR}, + + + #{status,jdbcType=TINYINT}, + + + #{payPassword,jdbcType=VARCHAR}, + + + #{applymentState,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{shopId,jdbcType=INTEGER}, + + + #{appToken,jdbcType=LONGVARCHAR}, + + + + + update tb_merchant_third_apply + + + type = #{type,jdbcType=VARCHAR}, + + + app_id = #{appId,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=TINYINT}, + + + pay_password = #{payPassword,jdbcType=VARCHAR}, + + + applyment_state = #{applymentState,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + app_token = #{appToken,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_merchant_third_apply + set type = #{type,jdbcType=VARCHAR}, + app_id = #{appId,jdbcType=VARCHAR}, + status = #{status,jdbcType=TINYINT}, + pay_password = #{payPassword,jdbcType=VARCHAR}, + applyment_state = #{applymentState,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + shop_id = #{shopId,jdbcType=INTEGER}, + app_token = #{appToken,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_merchant_third_apply + set type = #{type,jdbcType=VARCHAR}, + app_id = #{appId,jdbcType=VARCHAR}, + status = #{status,jdbcType=TINYINT}, + pay_password = #{payPassword,jdbcType=VARCHAR}, + applyment_state = #{applymentState,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + shop_id = #{shopId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbOrderDetailMapper.xml b/src/main/resources/mapper/TbOrderDetailMapper.xml new file mode 100644 index 0000000..353eea3 --- /dev/null +++ b/src/main/resources/mapper/TbOrderDetailMapper.xml @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name, + product_img, create_time, update_time, price, price_amount,status,pack_amount + + + + + delete from tb_order_detail + where id = #{id,jdbcType=INTEGER} + + + delete from tb_order_detail where order_id = #{orderId} + + + insert into tb_order_detail (id, order_id, shop_id, + product_id, product_sku_id, num, + product_name, product_sku_name, product_img, + create_time, update_time, price, + price_amount,pack_amount,status) + values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, + #{productId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER}, #{num,jdbcType=INTEGER}, + #{productName,jdbcType=VARCHAR}, #{productSkuName,jdbcType=VARCHAR}, #{productImg,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{price,jdbcType=DECIMAL}, + #{priceAmount,jdbcType=DECIMAL},#{packAmount,jdbcType=DECIMAL},#{status,jdbcType=VARCHAR}) + + + insert into tb_order_detail + + + id, + + + order_id, + + + shop_id, + + + product_id, + + + product_sku_id, + + + num, + + + product_name, + + + product_sku_name, + + + product_img, + + + create_time, + + + update_time, + + + price, + + + price_amount, + + + + + #{id,jdbcType=INTEGER}, + + + #{orderId,jdbcType=INTEGER}, + + + #{shopId,jdbcType=INTEGER}, + + + #{productId,jdbcType=INTEGER}, + + + #{productSkuId,jdbcType=INTEGER}, + + + #{num,jdbcType=INTEGER}, + + + #{productName,jdbcType=VARCHAR}, + + + #{productSkuName,jdbcType=VARCHAR}, + + + #{productImg,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{price,jdbcType=DECIMAL}, + + + #{priceAmount,jdbcType=DECIMAL}, + + + + + update tb_order_detail + + + order_id = #{orderId,jdbcType=INTEGER}, + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + product_id = #{productId,jdbcType=INTEGER}, + + + product_sku_id = #{productSkuId,jdbcType=INTEGER}, + + + num = #{num,jdbcType=INTEGER}, + + + product_name = #{productName,jdbcType=VARCHAR}, + + + sstatus = #{sstatus,jdbcType=VARCHAR}, + + + product_sku_name = #{productSkuName,jdbcType=VARCHAR}, + + + product_img = #{productImg,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + price = #{price,jdbcType=DECIMAL}, + + + price_amount = #{priceAmount,jdbcType=DECIMAL}, + + + pack_amount = #{packAmount,jdbcType=DECIMAL}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_order_detail + set order_id = #{orderId,jdbcType=INTEGER}, + shop_id = #{shopId,jdbcType=INTEGER}, + product_id = #{productId,jdbcType=INTEGER}, + product_sku_id = #{productSkuId,jdbcType=INTEGER}, + num = #{num,jdbcType=INTEGER}, + product_name = #{productName,jdbcType=VARCHAR}, + product_sku_name = #{productSkuName,jdbcType=VARCHAR}, + product_img = #{productImg,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + price = #{price,jdbcType=DECIMAL}, + price_amount = #{priceAmount,jdbcType=DECIMAL} + where id = #{id,jdbcType=INTEGER} + + + update tb_order_detail set status = #{status} where order_id = #{orderId} + + + + + + update tb_order_detail + set status= #{item.status} + where id = #{item.id} + + + + + + + + + update tb_order_detail set status = #{status} where order_id = #{orderId} and status='unpaid' + + + + insert into tb_order_detail (order_id, shop_id, + product_id, product_sku_id, num, + product_name, product_sku_name, product_img, + create_time, update_time, price, + price_amount,pack_amount,status) values + + (#{orderId},#{item.shopId},#{item.productId},#{item.productSkuId},#{item.num},#{item.productName},#{item.productSkuName},#{item.productImg},#{item.createTime},#{item.updateTime},#{item.price},#{item.priceAmount},#{item.packAmount},#{item.status}) + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbOrderExtendMapper.xml b/src/main/resources/mapper/TbOrderExtendMapper.xml new file mode 100644 index 0000000..eaeed44 --- /dev/null +++ b/src/main/resources/mapper/TbOrderExtendMapper.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + id, creator_snap, cashier_snap, terminal_snap, table_party, shop_id, created_at, + updated_at, shop_snap + + + cart_list, payment_list + + + + delete from tb_order_extend + where id = #{id,jdbcType=INTEGER} + + + insert into tb_order_extend (id, creator_snap, cashier_snap, + terminal_snap, table_party, shop_id, + created_at, updated_at, shop_snap, + cart_list, payment_list) + values (#{id,jdbcType=INTEGER}, #{creatorSnap,jdbcType=VARCHAR}, #{cashierSnap,jdbcType=VARCHAR}, + #{terminalSnap,jdbcType=VARCHAR}, #{tableParty,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{shopSnap,jdbcType=VARCHAR}, + #{cartList,jdbcType=LONGVARCHAR}, #{paymentList,jdbcType=LONGVARCHAR}) + + + insert into tb_order_extend + + + id, + + + creator_snap, + + + cashier_snap, + + + terminal_snap, + + + table_party, + + + shop_id, + + + created_at, + + + updated_at, + + + shop_snap, + + + cart_list, + + + payment_list, + + + + + #{id,jdbcType=INTEGER}, + + + #{creatorSnap,jdbcType=VARCHAR}, + + + #{cashierSnap,jdbcType=VARCHAR}, + + + #{terminalSnap,jdbcType=VARCHAR}, + + + #{tableParty,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{shopSnap,jdbcType=VARCHAR}, + + + #{cartList,jdbcType=LONGVARCHAR}, + + + #{paymentList,jdbcType=LONGVARCHAR}, + + + + + update tb_order_extend + + + creator_snap = #{creatorSnap,jdbcType=VARCHAR}, + + + cashier_snap = #{cashierSnap,jdbcType=VARCHAR}, + + + terminal_snap = #{terminalSnap,jdbcType=VARCHAR}, + + + table_party = #{tableParty,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + shop_snap = #{shopSnap,jdbcType=VARCHAR}, + + + cart_list = #{cartList,jdbcType=LONGVARCHAR}, + + + payment_list = #{paymentList,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_order_extend + set creator_snap = #{creatorSnap,jdbcType=VARCHAR}, + cashier_snap = #{cashierSnap,jdbcType=VARCHAR}, + terminal_snap = #{terminalSnap,jdbcType=VARCHAR}, + table_party = #{tableParty,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + shop_snap = #{shopSnap,jdbcType=VARCHAR}, + cart_list = #{cartList,jdbcType=LONGVARCHAR}, + payment_list = #{paymentList,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_order_extend + set creator_snap = #{creatorSnap,jdbcType=VARCHAR}, + cashier_snap = #{cashierSnap,jdbcType=VARCHAR}, + terminal_snap = #{terminalSnap,jdbcType=VARCHAR}, + table_party = #{tableParty,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + shop_snap = #{shopSnap,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbOrderInfoMapper.xml b/src/main/resources/mapper/TbOrderInfoMapper.xml new file mode 100644 index 0000000..da02b43 --- /dev/null +++ b/src/main/resources/mapper/TbOrderInfoMapper.xml @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, order_no, settlement_amount, pack_fee, origin_amount, product_amount, amount, + refund_amount, pay_type, pay_amount, order_amount, freight_amount, discount_ratio, + discount_amount, table_id, small_change, send_type, order_type, product_type, status, + billing_id, merchant_id, shop_id, is_vip, member_id, user_id, product_score, deduct_score, + user_coupon_id, user_coupon_amount, refund_able, paid_time, is_effect, is_group, + updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name` + + + + + delete from tb_order_info + where id = #{id,jdbcType=INTEGER} + + + + insert into tb_order_info (id, order_no, settlement_amount, + pack_fee, origin_amount, product_amount, + amount, refund_amount, pay_type, + pay_amount, order_amount, freight_amount, + discount_ratio, discount_amount, table_id, + small_change, send_type, order_type, + product_type, status, billing_id, + merchant_id, shop_id, is_vip, + member_id, user_id, product_score, + deduct_score, user_coupon_id, user_coupon_amount, + refund_able, paid_time, is_effect, + is_group, updated_at, system_time, + created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name + ) + values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL}, + #{packFee,jdbcType=DECIMAL}, #{originAmount,jdbcType=DECIMAL}, #{productAmount,jdbcType=DECIMAL}, + #{amount,jdbcType=DECIMAL}, #{refundAmount,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, + #{payAmount,jdbcType=DECIMAL}, #{orderAmount,jdbcType=DECIMAL}, #{freightAmount,jdbcType=DECIMAL}, + #{discountRatio,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{tableId,jdbcType=VARCHAR}, + #{smallChange,jdbcType=DECIMAL}, #{sendType,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR}, + #{productType,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{billingId,jdbcType=VARCHAR}, + #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{isVip,jdbcType=TINYINT}, + #{memberId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{productScore,jdbcType=INTEGER}, + #{deductScore,jdbcType=INTEGER}, #{userCouponId,jdbcType=VARCHAR}, #{userCouponAmount,jdbcType=DECIMAL}, + #{refundAble,jdbcType=TINYINT}, #{paidTime,jdbcType=BIGINT}, #{isEffect,jdbcType=TINYINT}, + #{isGroup,jdbcType=TINYINT}, #{updatedAt,jdbcType=BIGINT}, #{systemTime,jdbcType=BIGINT}, + #{createdAt,jdbcType=BIGINT}, #{isAccepted,jdbcType=TINYINT}, #{payOrderNo,jdbcType=VARCHAR}, + #{tradeDay,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{masterId,jdbcType=VARCHAR},#{tableName,jdbcType=VARCHAR} + ) + + + insert into tb_order_info + + + id, + + + order_no, + + + settlement_amount, + + + pack_fee, + + + origin_amount, + + + product_amount, + + + amount, + + + refund_amount, + + + pay_type, + + + pay_amount, + + + order_amount, + + + freight_amount, + + + discount_ratio, + + + discount_amount, + + + table_id, + + + small_change, + + + send_type, + + + order_type, + + + product_type, + + + status, + + + billing_id, + + + merchant_id, + + + shop_id, + + + is_vip, + + + member_id, + + + user_id, + + + product_score, + + + deduct_score, + + + user_coupon_id, + + + user_coupon_amount, + + + refund_able, + + + paid_time, + + + is_effect, + + + is_group, + + + updated_at, + + + system_time, + + + created_at, + + + is_accepted, + + + pay_order_no, + + + + + #{id,jdbcType=INTEGER}, + + + #{orderNo,jdbcType=VARCHAR}, + + + #{settlementAmount,jdbcType=DECIMAL}, + + + #{packFee,jdbcType=DECIMAL}, + + + #{originAmount,jdbcType=DECIMAL}, + + + #{productAmount,jdbcType=DECIMAL}, + + + #{amount,jdbcType=DECIMAL}, + + + #{refundAmount,jdbcType=DECIMAL}, + + + #{payType,jdbcType=VARCHAR}, + + + #{payAmount,jdbcType=DECIMAL}, + + + #{orderAmount,jdbcType=DECIMAL}, + + + #{freightAmount,jdbcType=DECIMAL}, + + + #{discountRatio,jdbcType=DECIMAL}, + + + #{discountAmount,jdbcType=DECIMAL}, + + + #{tableId,jdbcType=VARCHAR}, + + + #{smallChange,jdbcType=DECIMAL}, + + + #{sendType,jdbcType=VARCHAR}, + + + #{orderType,jdbcType=VARCHAR}, + + + #{productType,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{billingId,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{isVip,jdbcType=TINYINT}, + + + #{memberId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{productScore,jdbcType=INTEGER}, + + + #{deductScore,jdbcType=INTEGER}, + + + #{userCouponId,jdbcType=VARCHAR}, + + + #{userCouponAmount,jdbcType=DECIMAL}, + + + #{refundAble,jdbcType=TINYINT}, + + + #{paidTime,jdbcType=BIGINT}, + + + #{isEffect,jdbcType=TINYINT}, + + + #{isGroup,jdbcType=TINYINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{systemTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{isAccepted,jdbcType=TINYINT}, + + + #{payOrderNo,jdbcType=VARCHAR}, + + + + + update tb_order_info + + + order_no = #{orderNo,jdbcType=VARCHAR}, + + + settlement_amount = #{settlementAmount,jdbcType=DECIMAL}, + + + pack_fee = #{packFee,jdbcType=DECIMAL}, + + + origin_amount = #{originAmount,jdbcType=DECIMAL}, + + + product_amount = #{productAmount,jdbcType=DECIMAL}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + refund_amount = #{refundAmount,jdbcType=DECIMAL}, + + + pay_type = #{payType,jdbcType=VARCHAR}, + + + pay_amount = #{payAmount,jdbcType=DECIMAL}, + + + order_amount = #{orderAmount,jdbcType=DECIMAL}, + + + freight_amount = #{freightAmount,jdbcType=DECIMAL}, + + + discount_ratio = #{discountRatio,jdbcType=DECIMAL}, + + + discount_amount = #{discountAmount,jdbcType=DECIMAL}, + + + table_id = #{tableId,jdbcType=VARCHAR}, + + + small_change = #{smallChange,jdbcType=DECIMAL}, + + + send_type = #{sendType,jdbcType=VARCHAR}, + + + order_type = #{orderType,jdbcType=VARCHAR}, + + + product_type = #{productType,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + billing_id = #{billingId,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + is_vip = #{isVip,jdbcType=TINYINT}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + product_score = #{productScore,jdbcType=INTEGER}, + + + deduct_score = #{deductScore,jdbcType=INTEGER}, + + + user_coupon_id = #{userCouponId,jdbcType=VARCHAR}, + + + user_coupon_amount = #{userCouponAmount,jdbcType=DECIMAL}, + + + refund_able = #{refundAble,jdbcType=TINYINT}, + + + paid_time = #{paidTime,jdbcType=BIGINT}, + + + is_effect = #{isEffect,jdbcType=TINYINT}, + + + is_group = #{isGroup,jdbcType=TINYINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + system_time = #{systemTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + is_accepted = #{isAccepted,jdbcType=TINYINT}, + + + pay_order_no = #{payOrderNo,jdbcType=VARCHAR}, + + + master_id = #{masterId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_order_info + set order_no = #{orderNo,jdbcType=VARCHAR}, + settlement_amount = #{settlementAmount,jdbcType=DECIMAL}, + pack_fee = #{packFee,jdbcType=DECIMAL}, + origin_amount = #{originAmount,jdbcType=DECIMAL}, + product_amount = #{productAmount,jdbcType=DECIMAL}, + amount = #{amount,jdbcType=DECIMAL}, + refund_amount = #{refundAmount,jdbcType=DECIMAL}, + pay_type = #{payType,jdbcType=VARCHAR}, + pay_amount = #{payAmount,jdbcType=DECIMAL}, + order_amount = #{orderAmount,jdbcType=DECIMAL}, + freight_amount = #{freightAmount,jdbcType=DECIMAL}, + discount_ratio = #{discountRatio,jdbcType=DECIMAL}, + discount_amount = #{discountAmount,jdbcType=DECIMAL}, + table_id = #{tableId,jdbcType=VARCHAR}, + small_change = #{smallChange,jdbcType=DECIMAL}, + send_type = #{sendType,jdbcType=VARCHAR}, + order_type = #{orderType,jdbcType=VARCHAR}, + product_type = #{productType,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + billing_id = #{billingId,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + is_vip = #{isVip,jdbcType=TINYINT}, + member_id = #{memberId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + product_score = #{productScore,jdbcType=INTEGER}, + deduct_score = #{deductScore,jdbcType=INTEGER}, + user_coupon_id = #{userCouponId,jdbcType=VARCHAR}, + user_coupon_amount = #{userCouponAmount,jdbcType=DECIMAL}, + refund_able = #{refundAble,jdbcType=TINYINT}, + paid_time = #{paidTime,jdbcType=BIGINT}, + is_effect = #{isEffect,jdbcType=TINYINT}, + is_group = #{isGroup,jdbcType=TINYINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + system_time = #{systemTime,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + is_accepted = #{isAccepted,jdbcType=TINYINT}, + pay_order_no = #{payOrderNo,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_order_info set status = #{status} where id = #{orderId} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbOrderPaymentMapper.xml b/src/main/resources/mapper/TbOrderPaymentMapper.xml new file mode 100644 index 0000000..9e85d21 --- /dev/null +++ b/src/main/resources/mapper/TbOrderPaymentMapper.xml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, pay_type_id, amount, paid_amount, has_refund_amount, pay_name, pay_type, received, + change_fee, merchant_id, shop_id, billing_id, order_id, auth_code, refundable, created_at, + updated_at, trade_number, member_id + + + + delete from tb_order_payment + where id = #{id,jdbcType=INTEGER} + + + insert into tb_order_payment (id, pay_type_id, amount, + paid_amount, has_refund_amount, pay_name, + pay_type, received, change_fee, + merchant_id, shop_id, billing_id, + order_id, auth_code, refundable, + created_at, updated_at, trade_number, + member_id) + values (#{id,jdbcType=INTEGER}, #{payTypeId,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, + #{paidAmount,jdbcType=DECIMAL}, #{hasRefundAmount,jdbcType=DECIMAL}, #{payName,jdbcType=VARCHAR}, + #{payType,jdbcType=VARCHAR}, #{received,jdbcType=DECIMAL}, #{changeFee,jdbcType=DECIMAL}, + #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{billingId,jdbcType=VARCHAR}, + #{orderId,jdbcType=VARCHAR}, #{authCode,jdbcType=VARCHAR}, #{refundable,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{tradeNumber,jdbcType=VARCHAR}, + #{memberId,jdbcType=VARCHAR}) + + + insert into tb_order_payment + + + id, + + + pay_type_id, + + + amount, + + + paid_amount, + + + has_refund_amount, + + + pay_name, + + + pay_type, + + + received, + + + change_fee, + + + merchant_id, + + + shop_id, + + + billing_id, + + + order_id, + + + auth_code, + + + refundable, + + + created_at, + + + updated_at, + + + trade_number, + + + member_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{payTypeId,jdbcType=VARCHAR}, + + + #{amount,jdbcType=DECIMAL}, + + + #{paidAmount,jdbcType=DECIMAL}, + + + #{hasRefundAmount,jdbcType=DECIMAL}, + + + #{payName,jdbcType=VARCHAR}, + + + #{payType,jdbcType=VARCHAR}, + + + #{received,jdbcType=DECIMAL}, + + + #{changeFee,jdbcType=DECIMAL}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{billingId,jdbcType=VARCHAR}, + + + #{orderId,jdbcType=VARCHAR}, + + + #{authCode,jdbcType=VARCHAR}, + + + #{refundable,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{tradeNumber,jdbcType=VARCHAR}, + + + #{memberId,jdbcType=VARCHAR}, + + + + + update tb_order_payment + + + pay_type_id = #{payTypeId,jdbcType=VARCHAR}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + paid_amount = #{paidAmount,jdbcType=DECIMAL}, + + + has_refund_amount = #{hasRefundAmount,jdbcType=DECIMAL}, + + + pay_name = #{payName,jdbcType=VARCHAR}, + + + pay_type = #{payType,jdbcType=VARCHAR}, + + + received = #{received,jdbcType=DECIMAL}, + + + change_fee = #{changeFee,jdbcType=DECIMAL}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + billing_id = #{billingId,jdbcType=VARCHAR}, + + + order_id = #{orderId,jdbcType=VARCHAR}, + + + auth_code = #{authCode,jdbcType=VARCHAR}, + + + refundable = #{refundable,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + trade_number = #{tradeNumber,jdbcType=VARCHAR}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_order_payment + set pay_type_id = #{payTypeId,jdbcType=VARCHAR}, + amount = #{amount,jdbcType=DECIMAL}, + paid_amount = #{paidAmount,jdbcType=DECIMAL}, + has_refund_amount = #{hasRefundAmount,jdbcType=DECIMAL}, + pay_name = #{payName,jdbcType=VARCHAR}, + pay_type = #{payType,jdbcType=VARCHAR}, + received = #{received,jdbcType=DECIMAL}, + change_fee = #{changeFee,jdbcType=DECIMAL}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + billing_id = #{billingId,jdbcType=VARCHAR}, + order_id = #{orderId,jdbcType=VARCHAR}, + auth_code = #{authCode,jdbcType=VARCHAR}, + refundable = #{refundable,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + trade_number = #{tradeNumber,jdbcType=VARCHAR}, + member_id = #{memberId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbPlussDeviceGoodsMapper.xml b/src/main/resources/mapper/TbPlussDeviceGoodsMapper.xml new file mode 100644 index 0000000..b67bfe7 --- /dev/null +++ b/src/main/resources/mapper/TbPlussDeviceGoodsMapper.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + id, code, name, deviceLogo, introDesc, sort, status, tagId, depositFlag, createTime, + updateTime + + + detail + + + + delete from tb_pluss_device_goods + where id = #{id,jdbcType=INTEGER} + + + insert into tb_pluss_device_goods (id, code, name, + deviceLogo, introDesc, sort, + status, tagId, depositFlag, + createTime, updateTime, detail + ) + values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{devicelogo,jdbcType=VARCHAR}, #{introdesc,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, + #{status,jdbcType=INTEGER}, #{tagid,jdbcType=INTEGER}, #{depositflag,jdbcType=VARCHAR}, + #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, #{detail,jdbcType=LONGVARCHAR} + ) + + + insert into tb_pluss_device_goods + + + id, + + + code, + + + name, + + + deviceLogo, + + + introDesc, + + + sort, + + + status, + + + tagId, + + + depositFlag, + + + createTime, + + + updateTime, + + + detail, + + + + + #{id,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{devicelogo,jdbcType=VARCHAR}, + + + #{introdesc,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{status,jdbcType=INTEGER}, + + + #{tagid,jdbcType=INTEGER}, + + + #{depositflag,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{updatetime,jdbcType=TIMESTAMP}, + + + #{detail,jdbcType=LONGVARCHAR}, + + + + + update tb_pluss_device_goods + + + code = #{code,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + deviceLogo = #{devicelogo,jdbcType=VARCHAR}, + + + introDesc = #{introdesc,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + status = #{status,jdbcType=INTEGER}, + + + tagId = #{tagid,jdbcType=INTEGER}, + + + depositFlag = #{depositflag,jdbcType=VARCHAR}, + + + createTime = #{createtime,jdbcType=TIMESTAMP}, + + + updateTime = #{updatetime,jdbcType=TIMESTAMP}, + + + detail = #{detail,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_pluss_device_goods + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + deviceLogo = #{devicelogo,jdbcType=VARCHAR}, + introDesc = #{introdesc,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + status = #{status,jdbcType=INTEGER}, + tagId = #{tagid,jdbcType=INTEGER}, + depositFlag = #{depositflag,jdbcType=VARCHAR}, + createTime = #{createtime,jdbcType=TIMESTAMP}, + updateTime = #{updatetime,jdbcType=TIMESTAMP}, + detail = #{detail,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_pluss_device_goods + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + deviceLogo = #{devicelogo,jdbcType=VARCHAR}, + introDesc = #{introdesc,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + status = #{status,jdbcType=INTEGER}, + tagId = #{tagid,jdbcType=INTEGER}, + depositFlag = #{depositflag,jdbcType=VARCHAR}, + createTime = #{createtime,jdbcType=TIMESTAMP}, + updateTime = #{updatetime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbPlussShopStaffMapper.xml b/src/main/resources/mapper/TbPlussShopStaffMapper.xml new file mode 100644 index 0000000..d44eb2f --- /dev/null +++ b/src/main/resources/mapper/TbPlussShopStaffMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + id, code, name, account, password, max_discount_amount, status, employee, shop_id, + created_at, updated_at, type + + + + delete from tb_pluss_shop_staff + where id = #{id,jdbcType=INTEGER} + + + insert into tb_pluss_shop_staff (id, code, name, + account, password, max_discount_amount, + status, employee, shop_id, + created_at, updated_at, type + ) + values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{maxDiscountAmount,jdbcType=DECIMAL}, + #{status,jdbcType=BIT}, #{employee,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR} + ) + + + insert into tb_pluss_shop_staff + + + id, + + + code, + + + name, + + + account, + + + password, + + + max_discount_amount, + + + status, + + + employee, + + + shop_id, + + + created_at, + + + updated_at, + + + type, + + + + + #{id,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{account,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{maxDiscountAmount,jdbcType=DECIMAL}, + + + #{status,jdbcType=BIT}, + + + #{employee,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{type,jdbcType=VARCHAR}, + + + + + update tb_pluss_shop_staff + + + code = #{code,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + account = #{account,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL}, + + + status = #{status,jdbcType=BIT}, + + + employee = #{employee,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + type = #{type,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_pluss_shop_staff + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + account = #{account,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL}, + status = #{status,jdbcType=BIT}, + employee = #{employee,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + type = #{type,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbPrintMachineMapper.xml b/src/main/resources/mapper/TbPrintMachineMapper.xml new file mode 100644 index 0000000..75c023a --- /dev/null +++ b/src/main/resources/mapper/TbPrintMachineMapper.xml @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, name, type, connection_type, address, port, sub_type, status, shop_id, category_ids, + content_type, created_at, updated_at, sort, vendor_id, product_id + + + config, category_list + + + + delete from tb_print_machine + where id = #{id,jdbcType=INTEGER} + + + insert into tb_print_machine (id, name, type, + connection_type, address, port, + sub_type, status, shop_id, + category_ids, content_type, created_at, + updated_at, sort, vendor_id, + product_id, config, category_list + ) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{connectionType,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, + #{subType,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR}, + #{categoryIds,jdbcType=VARCHAR}, #{contentType,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER}, #{vendorId,jdbcType=VARCHAR}, + #{productId,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR}, #{categoryList,jdbcType=LONGVARCHAR} + ) + + + insert into tb_print_machine + + + id, + + + name, + + + type, + + + connection_type, + + + address, + + + port, + + + sub_type, + + + status, + + + shop_id, + + + category_ids, + + + content_type, + + + created_at, + + + updated_at, + + + sort, + + + vendor_id, + + + product_id, + + + config, + + + category_list, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{connectionType,jdbcType=VARCHAR}, + + + #{address,jdbcType=VARCHAR}, + + + #{port,jdbcType=VARCHAR}, + + + #{subType,jdbcType=VARCHAR}, + + + #{status,jdbcType=TINYINT}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{categoryIds,jdbcType=VARCHAR}, + + + #{contentType,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{sort,jdbcType=INTEGER}, + + + #{vendorId,jdbcType=VARCHAR}, + + + #{productId,jdbcType=VARCHAR}, + + + #{config,jdbcType=LONGVARCHAR}, + + + #{categoryList,jdbcType=LONGVARCHAR}, + + + + + update tb_print_machine + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + connection_type = #{connectionType,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + port = #{port,jdbcType=VARCHAR}, + + + sub_type = #{subType,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=TINYINT}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + category_ids = #{categoryIds,jdbcType=VARCHAR}, + + + content_type = #{contentType,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + sort = #{sort,jdbcType=INTEGER}, + + + vendor_id = #{vendorId,jdbcType=VARCHAR}, + + + product_id = #{productId,jdbcType=VARCHAR}, + + + config = #{config,jdbcType=LONGVARCHAR}, + + + category_list = #{categoryList,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_print_machine + set name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + connection_type = #{connectionType,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + port = #{port,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=VARCHAR}, + status = #{status,jdbcType=TINYINT}, + shop_id = #{shopId,jdbcType=VARCHAR}, + category_ids = #{categoryIds,jdbcType=VARCHAR}, + content_type = #{contentType,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + sort = #{sort,jdbcType=INTEGER}, + vendor_id = #{vendorId,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR}, + config = #{config,jdbcType=LONGVARCHAR}, + category_list = #{categoryList,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_print_machine + set name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + connection_type = #{connectionType,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + port = #{port,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=VARCHAR}, + status = #{status,jdbcType=TINYINT}, + shop_id = #{shopId,jdbcType=VARCHAR}, + category_ids = #{categoryIds,jdbcType=VARCHAR}, + content_type = #{contentType,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + sort = #{sort,jdbcType=INTEGER}, + vendor_id = #{vendorId,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductGroupMapper.xml b/src/main/resources/mapper/TbProductGroupMapper.xml new file mode 100644 index 0000000..1d95b30 --- /dev/null +++ b/src/main/resources/mapper/TbProductGroupMapper.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + id, name, merchant_id, shop_id, pic, is_show, detail, style, sort, created_at, updated_at + + + product_ids + + + + delete from tb_product_group + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product_group (id, name, merchant_id, + shop_id, pic, is_show, + detail, style, sort, + created_at, updated_at, product_ids + ) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, + #{shopId,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR}, #{isShow,jdbcType=TINYINT}, + #{detail,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{productIds,jdbcType=LONGVARCHAR} + ) + + + insert into tb_product_group + + + id, + + + name, + + + merchant_id, + + + shop_id, + + + pic, + + + is_show, + + + detail, + + + style, + + + sort, + + + created_at, + + + updated_at, + + + product_ids, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=INTEGER}, + + + #{pic,jdbcType=VARCHAR}, + + + #{isShow,jdbcType=TINYINT}, + + + #{detail,jdbcType=VARCHAR}, + + + #{style,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{productIds,jdbcType=LONGVARCHAR}, + + + + + update tb_product_group + + + name = #{name,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + pic = #{pic,jdbcType=VARCHAR}, + + + is_show = #{isShow,jdbcType=TINYINT}, + + + detail = #{detail,jdbcType=VARCHAR}, + + + style = #{style,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + product_ids = #{productIds,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product_group + set name = #{name,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=INTEGER}, + pic = #{pic,jdbcType=VARCHAR}, + is_show = #{isShow,jdbcType=TINYINT}, + detail = #{detail,jdbcType=VARCHAR}, + style = #{style,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + product_ids = #{productIds,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product_group + set name = #{name,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=INTEGER}, + pic = #{pic,jdbcType=VARCHAR}, + is_show = #{isShow,jdbcType=TINYINT}, + detail = #{detail,jdbcType=VARCHAR}, + style = #{style,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductMapper.xml b/src/main/resources/mapper/TbProductMapper.xml new file mode 100644 index 0000000..1cdae6f --- /dev/null +++ b/src/main/resources/mapper/TbProductMapper.xml @@ -0,0 +1,918 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title, + type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img, + video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend, + is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock, + is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete, + created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count, + store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo, + is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time, + show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers + + + images, video, notice, group_snap, spec_info, select_spec + + + + delete from tb_product + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product (id, category_id, spec_id, + source_path, brand_id, merchant_id, + shop_id, name, short_title, + type, pack_fee, low_price, + low_member_price, unit_id, unit_snap, + cover_img, share_img, video_cover_img, + sort, limit_number, product_score, + status, fail_msg, is_recommend, + is_hot, is_new, is_on_sale, + is_show, type_enum, is_distribute, + is_del, is_stock, is_pause_sale, + is_free_freight, freight_id, strategy_type, + strategy_id, is_vip, is_delete, + created_at, updated_at, base_sales_number, + real_sales_number, sales_number, thumb_count, + store_count, furnish_meal, furnish_express, + furnish_draw, furnish_vir, is_combo, + is_show_cash, is_show_mall, is_need_examine, + show_on_mall_status, show_on_mall_time, show_on_mall_error_msg, + enable_label, tax_config_id, spec_table_headers, + images, video, notice, + group_snap, spec_info, select_spec + ) + values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER}, + #{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR}, + #{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL}, + #{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR}, + #{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR}, + #{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER}, + #{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT}, + #{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT}, + #{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT}, + #{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT}, + #{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR}, + #{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE}, + #{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER}, + #{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER}, + #{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT}, + #{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT}, + #{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR}, + #{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR}, + #{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR}, + #{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR} + ) + + + insert into tb_product + + + id, + + + category_id, + + + spec_id, + + + source_path, + + + brand_id, + + + merchant_id, + + + shop_id, + + + name, + + + short_title, + + + type, + + + pack_fee, + + + low_price, + + + low_member_price, + + + unit_id, + + + unit_snap, + + + cover_img, + + + share_img, + + + video_cover_img, + + + sort, + + + limit_number, + + + product_score, + + + status, + + + fail_msg, + + + is_recommend, + + + is_hot, + + + is_new, + + + is_on_sale, + + + is_show, + + + type_enum, + + + is_distribute, + + + is_del, + + + is_stock, + + + is_pause_sale, + + + is_free_freight, + + + freight_id, + + + strategy_type, + + + strategy_id, + + + is_vip, + + + is_delete, + + + created_at, + + + updated_at, + + + base_sales_number, + + + real_sales_number, + + + sales_number, + + + thumb_count, + + + store_count, + + + furnish_meal, + + + furnish_express, + + + furnish_draw, + + + furnish_vir, + + + is_combo, + + + is_show_cash, + + + is_show_mall, + + + is_need_examine, + + + show_on_mall_status, + + + show_on_mall_time, + + + show_on_mall_error_msg, + + + enable_label, + + + tax_config_id, + + + spec_table_headers, + + + images, + + + video, + + + notice, + + + group_snap, + + + spec_info, + + + select_spec, + + + + + #{id,jdbcType=INTEGER}, + + + #{categoryId,jdbcType=VARCHAR}, + + + #{specId,jdbcType=INTEGER}, + + + #{sourcePath,jdbcType=VARCHAR}, + + + #{brandId,jdbcType=INTEGER}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{shortTitle,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{packFee,jdbcType=DECIMAL}, + + + #{lowPrice,jdbcType=DECIMAL}, + + + #{lowMemberPrice,jdbcType=DECIMAL}, + + + #{unitId,jdbcType=VARCHAR}, + + + #{unitSnap,jdbcType=VARCHAR}, + + + #{coverImg,jdbcType=VARCHAR}, + + + #{shareImg,jdbcType=VARCHAR}, + + + #{videoCoverImg,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{limitNumber,jdbcType=INTEGER}, + + + #{productScore,jdbcType=INTEGER}, + + + #{status,jdbcType=TINYINT}, + + + #{failMsg,jdbcType=VARCHAR}, + + + #{isRecommend,jdbcType=TINYINT}, + + + #{isHot,jdbcType=TINYINT}, + + + #{isNew,jdbcType=TINYINT}, + + + #{isOnSale,jdbcType=TINYINT}, + + + #{isShow,jdbcType=TINYINT}, + + + #{typeEnum,jdbcType=VARCHAR}, + + + #{isDistribute,jdbcType=TINYINT}, + + + #{isDel,jdbcType=TINYINT}, + + + #{isStock,jdbcType=TINYINT}, + + + #{isPauseSale,jdbcType=TINYINT}, + + + #{isFreeFreight,jdbcType=TINYINT}, + + + #{freightId,jdbcType=BIGINT}, + + + #{strategyType,jdbcType=VARCHAR}, + + + #{strategyId,jdbcType=INTEGER}, + + + #{isVip,jdbcType=TINYINT}, + + + #{isDelete,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{baseSalesNumber,jdbcType=DOUBLE}, + + + #{realSalesNumber,jdbcType=INTEGER}, + + + #{salesNumber,jdbcType=INTEGER}, + + + #{thumbCount,jdbcType=INTEGER}, + + + #{storeCount,jdbcType=INTEGER}, + + + #{furnishMeal,jdbcType=INTEGER}, + + + #{furnishExpress,jdbcType=INTEGER}, + + + #{furnishDraw,jdbcType=INTEGER}, + + + #{furnishVir,jdbcType=INTEGER}, + + + #{isCombo,jdbcType=TINYINT}, + + + #{isShowCash,jdbcType=TINYINT}, + + + #{isShowMall,jdbcType=TINYINT}, + + + #{isNeedExamine,jdbcType=TINYINT}, + + + #{showOnMallStatus,jdbcType=TINYINT}, + + + #{showOnMallTime,jdbcType=BIGINT}, + + + #{showOnMallErrorMsg,jdbcType=VARCHAR}, + + + #{enableLabel,jdbcType=TINYINT}, + + + #{taxConfigId,jdbcType=VARCHAR}, + + + #{specTableHeaders,jdbcType=VARCHAR}, + + + #{images,jdbcType=LONGVARCHAR}, + + + #{video,jdbcType=LONGVARCHAR}, + + + #{notice,jdbcType=LONGVARCHAR}, + + + #{groupSnap,jdbcType=LONGVARCHAR}, + + + #{specInfo,jdbcType=LONGVARCHAR}, + + + #{selectSpec,jdbcType=LONGVARCHAR}, + + + + + update tb_product + + + category_id = #{categoryId,jdbcType=VARCHAR}, + + + spec_id = #{specId,jdbcType=INTEGER}, + + + source_path = #{sourcePath,jdbcType=VARCHAR}, + + + brand_id = #{brandId,jdbcType=INTEGER}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + short_title = #{shortTitle,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + pack_fee = #{packFee,jdbcType=DECIMAL}, + + + low_price = #{lowPrice,jdbcType=DECIMAL}, + + + low_member_price = #{lowMemberPrice,jdbcType=DECIMAL}, + + + unit_id = #{unitId,jdbcType=VARCHAR}, + + + unit_snap = #{unitSnap,jdbcType=VARCHAR}, + + + cover_img = #{coverImg,jdbcType=VARCHAR}, + + + share_img = #{shareImg,jdbcType=VARCHAR}, + + + video_cover_img = #{videoCoverImg,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + limit_number = #{limitNumber,jdbcType=INTEGER}, + + + product_score = #{productScore,jdbcType=INTEGER}, + + + status = #{status,jdbcType=TINYINT}, + + + fail_msg = #{failMsg,jdbcType=VARCHAR}, + + + is_recommend = #{isRecommend,jdbcType=TINYINT}, + + + is_hot = #{isHot,jdbcType=TINYINT}, + + + is_new = #{isNew,jdbcType=TINYINT}, + + + is_on_sale = #{isOnSale,jdbcType=TINYINT}, + + + is_show = #{isShow,jdbcType=TINYINT}, + + + type_enum = #{typeEnum,jdbcType=VARCHAR}, + + + is_distribute = #{isDistribute,jdbcType=TINYINT}, + + + is_del = #{isDel,jdbcType=TINYINT}, + + + is_stock = #{isStock,jdbcType=TINYINT}, + + + is_pause_sale = #{isPauseSale,jdbcType=TINYINT}, + + + is_free_freight = #{isFreeFreight,jdbcType=TINYINT}, + + + freight_id = #{freightId,jdbcType=BIGINT}, + + + strategy_type = #{strategyType,jdbcType=VARCHAR}, + + + strategy_id = #{strategyId,jdbcType=INTEGER}, + + + is_vip = #{isVip,jdbcType=TINYINT}, + + + is_delete = #{isDelete,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE}, + + + real_sales_number = #{realSalesNumber,jdbcType=INTEGER}, + + + sales_number = #{salesNumber,jdbcType=INTEGER}, + + + thumb_count = #{thumbCount,jdbcType=INTEGER}, + + + store_count = #{storeCount,jdbcType=INTEGER}, + + + furnish_meal = #{furnishMeal,jdbcType=INTEGER}, + + + furnish_express = #{furnishExpress,jdbcType=INTEGER}, + + + furnish_draw = #{furnishDraw,jdbcType=INTEGER}, + + + furnish_vir = #{furnishVir,jdbcType=INTEGER}, + + + is_combo = #{isCombo,jdbcType=TINYINT}, + + + is_show_cash = #{isShowCash,jdbcType=TINYINT}, + + + is_show_mall = #{isShowMall,jdbcType=TINYINT}, + + + is_need_examine = #{isNeedExamine,jdbcType=TINYINT}, + + + show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT}, + + + show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT}, + + + show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR}, + + + enable_label = #{enableLabel,jdbcType=TINYINT}, + + + tax_config_id = #{taxConfigId,jdbcType=VARCHAR}, + + + spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}, + + + images = #{images,jdbcType=LONGVARCHAR}, + + + video = #{video,jdbcType=LONGVARCHAR}, + + + notice = #{notice,jdbcType=LONGVARCHAR}, + + + group_snap = #{groupSnap,jdbcType=LONGVARCHAR}, + + + spec_info = #{specInfo,jdbcType=LONGVARCHAR}, + + + select_spec = #{selectSpec,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product + set category_id = #{categoryId,jdbcType=VARCHAR}, + spec_id = #{specId,jdbcType=INTEGER}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + brand_id = #{brandId,jdbcType=INTEGER}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + short_title = #{shortTitle,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + pack_fee = #{packFee,jdbcType=DECIMAL}, + low_price = #{lowPrice,jdbcType=DECIMAL}, + low_member_price = #{lowMemberPrice,jdbcType=DECIMAL}, + unit_id = #{unitId,jdbcType=VARCHAR}, + unit_snap = #{unitSnap,jdbcType=VARCHAR}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + share_img = #{shareImg,jdbcType=VARCHAR}, + video_cover_img = #{videoCoverImg,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + limit_number = #{limitNumber,jdbcType=INTEGER}, + product_score = #{productScore,jdbcType=INTEGER}, + status = #{status,jdbcType=TINYINT}, + fail_msg = #{failMsg,jdbcType=VARCHAR}, + is_recommend = #{isRecommend,jdbcType=TINYINT}, + is_hot = #{isHot,jdbcType=TINYINT}, + is_new = #{isNew,jdbcType=TINYINT}, + is_on_sale = #{isOnSale,jdbcType=TINYINT}, + is_show = #{isShow,jdbcType=TINYINT}, + type_enum = #{typeEnum,jdbcType=VARCHAR}, + is_distribute = #{isDistribute,jdbcType=TINYINT}, + is_del = #{isDel,jdbcType=TINYINT}, + is_stock = #{isStock,jdbcType=TINYINT}, + is_pause_sale = #{isPauseSale,jdbcType=TINYINT}, + is_free_freight = #{isFreeFreight,jdbcType=TINYINT}, + freight_id = #{freightId,jdbcType=BIGINT}, + strategy_type = #{strategyType,jdbcType=VARCHAR}, + strategy_id = #{strategyId,jdbcType=INTEGER}, + is_vip = #{isVip,jdbcType=TINYINT}, + is_delete = #{isDelete,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE}, + real_sales_number = #{realSalesNumber,jdbcType=INTEGER}, + sales_number = #{salesNumber,jdbcType=INTEGER}, + thumb_count = #{thumbCount,jdbcType=INTEGER}, + store_count = #{storeCount,jdbcType=INTEGER}, + furnish_meal = #{furnishMeal,jdbcType=INTEGER}, + furnish_express = #{furnishExpress,jdbcType=INTEGER}, + furnish_draw = #{furnishDraw,jdbcType=INTEGER}, + furnish_vir = #{furnishVir,jdbcType=INTEGER}, + is_combo = #{isCombo,jdbcType=TINYINT}, + is_show_cash = #{isShowCash,jdbcType=TINYINT}, + is_show_mall = #{isShowMall,jdbcType=TINYINT}, + is_need_examine = #{isNeedExamine,jdbcType=TINYINT}, + show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT}, + show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT}, + show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR}, + enable_label = #{enableLabel,jdbcType=TINYINT}, + tax_config_id = #{taxConfigId,jdbcType=VARCHAR}, + spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}, + images = #{images,jdbcType=LONGVARCHAR}, + video = #{video,jdbcType=LONGVARCHAR}, + notice = #{notice,jdbcType=LONGVARCHAR}, + group_snap = #{groupSnap,jdbcType=LONGVARCHAR}, + spec_info = #{specInfo,jdbcType=LONGVARCHAR}, + select_spec = #{selectSpec,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product + set category_id = #{categoryId,jdbcType=VARCHAR}, + spec_id = #{specId,jdbcType=INTEGER}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + brand_id = #{brandId,jdbcType=INTEGER}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + short_title = #{shortTitle,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + pack_fee = #{packFee,jdbcType=DECIMAL}, + low_price = #{lowPrice,jdbcType=DECIMAL}, + low_member_price = #{lowMemberPrice,jdbcType=DECIMAL}, + unit_id = #{unitId,jdbcType=VARCHAR}, + unit_snap = #{unitSnap,jdbcType=VARCHAR}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + share_img = #{shareImg,jdbcType=VARCHAR}, + video_cover_img = #{videoCoverImg,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + limit_number = #{limitNumber,jdbcType=INTEGER}, + product_score = #{productScore,jdbcType=INTEGER}, + status = #{status,jdbcType=TINYINT}, + fail_msg = #{failMsg,jdbcType=VARCHAR}, + is_recommend = #{isRecommend,jdbcType=TINYINT}, + is_hot = #{isHot,jdbcType=TINYINT}, + is_new = #{isNew,jdbcType=TINYINT}, + is_on_sale = #{isOnSale,jdbcType=TINYINT}, + is_show = #{isShow,jdbcType=TINYINT}, + type_enum = #{typeEnum,jdbcType=VARCHAR}, + is_distribute = #{isDistribute,jdbcType=TINYINT}, + is_del = #{isDel,jdbcType=TINYINT}, + is_stock = #{isStock,jdbcType=TINYINT}, + is_pause_sale = #{isPauseSale,jdbcType=TINYINT}, + is_free_freight = #{isFreeFreight,jdbcType=TINYINT}, + freight_id = #{freightId,jdbcType=BIGINT}, + strategy_type = #{strategyType,jdbcType=VARCHAR}, + strategy_id = #{strategyId,jdbcType=INTEGER}, + is_vip = #{isVip,jdbcType=TINYINT}, + is_delete = #{isDelete,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE}, + real_sales_number = #{realSalesNumber,jdbcType=INTEGER}, + sales_number = #{salesNumber,jdbcType=INTEGER}, + thumb_count = #{thumbCount,jdbcType=INTEGER}, + store_count = #{storeCount,jdbcType=INTEGER}, + furnish_meal = #{furnishMeal,jdbcType=INTEGER}, + furnish_express = #{furnishExpress,jdbcType=INTEGER}, + furnish_draw = #{furnishDraw,jdbcType=INTEGER}, + furnish_vir = #{furnishVir,jdbcType=INTEGER}, + is_combo = #{isCombo,jdbcType=TINYINT}, + is_show_cash = #{isShowCash,jdbcType=TINYINT}, + is_show_mall = #{isShowMall,jdbcType=TINYINT}, + is_need_examine = #{isNeedExamine,jdbcType=TINYINT}, + show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT}, + show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT}, + show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR}, + enable_label = #{enableLabel,jdbcType=TINYINT}, + tax_config_id = #{taxConfigId,jdbcType=VARCHAR}, + spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductSkuMapper.xml b/src/main/resources/mapper/TbProductSkuMapper.xml new file mode 100644 index 0000000..33fbf77 --- /dev/null +++ b/src/main/resources/mapper/TbProductSkuMapper.xml @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, shop_id, bar_code, product_id, origin_price, cost_price, member_price, meal_price, + sale_price, guide_price, strategy_price, stock_number, cover_img, warn_line, weight, + volume, real_sales_number, first_shared, second_shared, created_at, updated_at + + + spec_info, spec_snap + + + + delete from tb_product_sku + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product_sku (id, shop_id, bar_code, + product_id, origin_price, cost_price, + member_price, meal_price, sale_price, + guide_price, strategy_price, stock_number, + cover_img, warn_line, weight, + volume, real_sales_number, first_shared, + second_shared, created_at, updated_at, + spec_info, spec_snap) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{barCode,jdbcType=VARCHAR}, + #{productId,jdbcType=VARCHAR}, #{originPrice,jdbcType=DECIMAL}, #{costPrice,jdbcType=DECIMAL}, + #{memberPrice,jdbcType=DECIMAL}, #{mealPrice,jdbcType=DECIMAL}, #{salePrice,jdbcType=DECIMAL}, + #{guidePrice,jdbcType=DECIMAL}, #{strategyPrice,jdbcType=DECIMAL}, #{stockNumber,jdbcType=DOUBLE}, + #{coverImg,jdbcType=VARCHAR}, #{warnLine,jdbcType=INTEGER}, #{weight,jdbcType=DOUBLE}, + #{volume,jdbcType=REAL}, #{realSalesNumber,jdbcType=DOUBLE}, #{firstShared,jdbcType=DECIMAL}, + #{secondShared,jdbcType=DECIMAL}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{specInfo,jdbcType=LONGVARCHAR}, #{specSnap,jdbcType=LONGVARCHAR}) + + + insert into tb_product_sku + + + id, + + + shop_id, + + + bar_code, + + + product_id, + + + origin_price, + + + cost_price, + + + member_price, + + + meal_price, + + + sale_price, + + + guide_price, + + + strategy_price, + + + stock_number, + + + cover_img, + + + warn_line, + + + weight, + + + volume, + + + real_sales_number, + + + first_shared, + + + second_shared, + + + created_at, + + + updated_at, + + + spec_info, + + + spec_snap, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{barCode,jdbcType=VARCHAR}, + + + #{productId,jdbcType=VARCHAR}, + + + #{originPrice,jdbcType=DECIMAL}, + + + #{costPrice,jdbcType=DECIMAL}, + + + #{memberPrice,jdbcType=DECIMAL}, + + + #{mealPrice,jdbcType=DECIMAL}, + + + #{salePrice,jdbcType=DECIMAL}, + + + #{guidePrice,jdbcType=DECIMAL}, + + + #{strategyPrice,jdbcType=DECIMAL}, + + + #{stockNumber,jdbcType=DOUBLE}, + + + #{coverImg,jdbcType=VARCHAR}, + + + #{warnLine,jdbcType=INTEGER}, + + + #{weight,jdbcType=DOUBLE}, + + + #{volume,jdbcType=REAL}, + + + #{realSalesNumber,jdbcType=DOUBLE}, + + + #{firstShared,jdbcType=DECIMAL}, + + + #{secondShared,jdbcType=DECIMAL}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{specInfo,jdbcType=LONGVARCHAR}, + + + #{specSnap,jdbcType=LONGVARCHAR}, + + + + + update tb_product_sku + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + bar_code = #{barCode,jdbcType=VARCHAR}, + + + product_id = #{productId,jdbcType=VARCHAR}, + + + origin_price = #{originPrice,jdbcType=DECIMAL}, + + + cost_price = #{costPrice,jdbcType=DECIMAL}, + + + member_price = #{memberPrice,jdbcType=DECIMAL}, + + + meal_price = #{mealPrice,jdbcType=DECIMAL}, + + + sale_price = #{salePrice,jdbcType=DECIMAL}, + + + guide_price = #{guidePrice,jdbcType=DECIMAL}, + + + strategy_price = #{strategyPrice,jdbcType=DECIMAL}, + + + stock_number = #{stockNumber,jdbcType=DOUBLE}, + + + cover_img = #{coverImg,jdbcType=VARCHAR}, + + + warn_line = #{warnLine,jdbcType=INTEGER}, + + + weight = #{weight,jdbcType=DOUBLE}, + + + volume = #{volume,jdbcType=REAL}, + + + real_sales_number = #{realSalesNumber,jdbcType=DOUBLE}, + + + first_shared = #{firstShared,jdbcType=DECIMAL}, + + + second_shared = #{secondShared,jdbcType=DECIMAL}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + spec_info = #{specInfo,jdbcType=LONGVARCHAR}, + + + spec_snap = #{specSnap,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product_sku + set shop_id = #{shopId,jdbcType=VARCHAR}, + bar_code = #{barCode,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR}, + origin_price = #{originPrice,jdbcType=DECIMAL}, + cost_price = #{costPrice,jdbcType=DECIMAL}, + member_price = #{memberPrice,jdbcType=DECIMAL}, + meal_price = #{mealPrice,jdbcType=DECIMAL}, + sale_price = #{salePrice,jdbcType=DECIMAL}, + guide_price = #{guidePrice,jdbcType=DECIMAL}, + strategy_price = #{strategyPrice,jdbcType=DECIMAL}, + stock_number = #{stockNumber,jdbcType=DOUBLE}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + warn_line = #{warnLine,jdbcType=INTEGER}, + weight = #{weight,jdbcType=DOUBLE}, + volume = #{volume,jdbcType=REAL}, + real_sales_number = #{realSalesNumber,jdbcType=DOUBLE}, + first_shared = #{firstShared,jdbcType=DECIMAL}, + second_shared = #{secondShared,jdbcType=DECIMAL}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + spec_info = #{specInfo,jdbcType=LONGVARCHAR}, + spec_snap = #{specSnap,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product_sku + set shop_id = #{shopId,jdbcType=VARCHAR}, + bar_code = #{barCode,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR}, + origin_price = #{originPrice,jdbcType=DECIMAL}, + cost_price = #{costPrice,jdbcType=DECIMAL}, + member_price = #{memberPrice,jdbcType=DECIMAL}, + meal_price = #{mealPrice,jdbcType=DECIMAL}, + sale_price = #{salePrice,jdbcType=DECIMAL}, + guide_price = #{guidePrice,jdbcType=DECIMAL}, + strategy_price = #{strategyPrice,jdbcType=DECIMAL}, + stock_number = #{stockNumber,jdbcType=DOUBLE}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + warn_line = #{warnLine,jdbcType=INTEGER}, + weight = #{weight,jdbcType=DOUBLE}, + volume = #{volume,jdbcType=REAL}, + real_sales_number = #{realSalesNumber,jdbcType=DOUBLE}, + first_shared = #{firstShared,jdbcType=DECIMAL}, + second_shared = #{secondShared,jdbcType=DECIMAL}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductSkuResultMapper.xml b/src/main/resources/mapper/TbProductSkuResultMapper.xml new file mode 100644 index 0000000..a2d2eb9 --- /dev/null +++ b/src/main/resources/mapper/TbProductSkuResultMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + id, merchant_id, spec_id, created_at, updated_at + + + tag_snap + + + + delete from tb_product_sku_result + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product_sku_result (id, merchant_id, spec_id, + created_at, updated_at, tag_snap + ) + values (#{id,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR}, #{specId,jdbcType=BIGINT}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{tagSnap,jdbcType=LONGVARCHAR} + ) + + + insert into tb_product_sku_result + + + id, + + + merchant_id, + + + spec_id, + + + created_at, + + + updated_at, + + + tag_snap, + + + + + #{id,jdbcType=INTEGER}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{specId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{tagSnap,jdbcType=LONGVARCHAR}, + + + + + update tb_product_sku_result + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + spec_id = #{specId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + tag_snap = #{tagSnap,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product_sku_result + set merchant_id = #{merchantId,jdbcType=VARCHAR}, + spec_id = #{specId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + tag_snap = #{tagSnap,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product_sku_result + set merchant_id = #{merchantId,jdbcType=VARCHAR}, + spec_id = #{specId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductSpecMapper.xml b/src/main/resources/mapper/TbProductSpecMapper.xml new file mode 100644 index 0000000..109441e --- /dev/null +++ b/src/main/resources/mapper/TbProductSpecMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + id, shop_id, name, spec_tag, spec_tag_detail, sort, created_at, updated_at + + + spec_list + + + + delete from tb_product_spec + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product_spec (id, shop_id, name, + spec_tag, spec_tag_detail, sort, + created_at, updated_at, spec_list + ) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{specTag,jdbcType=VARCHAR}, #{specTagDetail,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{specList,jdbcType=LONGVARCHAR} + ) + + + insert into tb_product_spec + + + id, + + + shop_id, + + + name, + + + spec_tag, + + + spec_tag_detail, + + + sort, + + + created_at, + + + updated_at, + + + spec_list, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{specTag,jdbcType=VARCHAR}, + + + #{specTagDetail,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{specList,jdbcType=LONGVARCHAR}, + + + + + update tb_product_spec + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + spec_tag = #{specTag,jdbcType=VARCHAR}, + + + spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + spec_list = #{specList,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product_spec + set shop_id = #{shopId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + spec_tag = #{specTag,jdbcType=VARCHAR}, + spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + spec_list = #{specList,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product_spec + set shop_id = #{shopId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + spec_tag = #{specTag,jdbcType=VARCHAR}, + spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductStockDetailMapper.xml b/src/main/resources/mapper/TbProductStockDetailMapper.xml new file mode 100644 index 0000000..55056d6 --- /dev/null +++ b/src/main/resources/mapper/TbProductStockDetailMapper.xml @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, sku_id, product_id, product_name, is_stock, spec_snap, unit_name, shop_id, record_id, + batch_number, source_path, order_id, sub_type, type, left_number, stock_time, stock_number, + cost_amount, sales_amount, operator, remark, bar_code, cover_img, created_at, updated_at + + + stock_snap + + + + delete from tb_product_stock_detail + where id = #{id,jdbcType=BIGINT} + + + insert into tb_product_stock_detail (id, sku_id, product_id, + product_name, is_stock, spec_snap, + unit_name, shop_id, record_id, + batch_number, source_path, order_id, + sub_type, type, left_number, + stock_time, stock_number, cost_amount, + sales_amount, operator, remark, + bar_code, cover_img, created_at, + updated_at, stock_snap) + values (#{id,jdbcType=BIGINT}, #{skuId,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, + #{productName,jdbcType=VARCHAR}, #{isStock,jdbcType=TINYINT}, #{specSnap,jdbcType=VARCHAR}, + #{unitName,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{recordId,jdbcType=VARCHAR}, + #{batchNumber,jdbcType=VARCHAR}, #{sourcePath,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, + #{subType,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{leftNumber,jdbcType=INTEGER}, + #{stockTime,jdbcType=BIGINT}, #{stockNumber,jdbcType=DOUBLE}, #{costAmount,jdbcType=DECIMAL}, + #{salesAmount,jdbcType=DECIMAL}, #{operator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{barCode,jdbcType=VARCHAR}, #{coverImg,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{stockSnap,jdbcType=LONGVARCHAR}) + + + insert into tb_product_stock_detail + + + id, + + + sku_id, + + + product_id, + + + product_name, + + + is_stock, + + + spec_snap, + + + unit_name, + + + shop_id, + + + record_id, + + + batch_number, + + + source_path, + + + order_id, + + + sub_type, + + + type, + + + left_number, + + + stock_time, + + + stock_number, + + + cost_amount, + + + sales_amount, + + + operator, + + + remark, + + + bar_code, + + + cover_img, + + + created_at, + + + updated_at, + + + stock_snap, + + + + + #{id,jdbcType=BIGINT}, + + + #{skuId,jdbcType=VARCHAR}, + + + #{productId,jdbcType=VARCHAR}, + + + #{productName,jdbcType=VARCHAR}, + + + #{isStock,jdbcType=TINYINT}, + + + #{specSnap,jdbcType=VARCHAR}, + + + #{unitName,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{recordId,jdbcType=VARCHAR}, + + + #{batchNumber,jdbcType=VARCHAR}, + + + #{sourcePath,jdbcType=VARCHAR}, + + + #{orderId,jdbcType=VARCHAR}, + + + #{subType,jdbcType=TINYINT}, + + + #{type,jdbcType=VARCHAR}, + + + #{leftNumber,jdbcType=INTEGER}, + + + #{stockTime,jdbcType=BIGINT}, + + + #{stockNumber,jdbcType=DOUBLE}, + + + #{costAmount,jdbcType=DECIMAL}, + + + #{salesAmount,jdbcType=DECIMAL}, + + + #{operator,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{barCode,jdbcType=VARCHAR}, + + + #{coverImg,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{stockSnap,jdbcType=LONGVARCHAR}, + + + + + update tb_product_stock_detail + + + sku_id = #{skuId,jdbcType=VARCHAR}, + + + product_id = #{productId,jdbcType=VARCHAR}, + + + product_name = #{productName,jdbcType=VARCHAR}, + + + is_stock = #{isStock,jdbcType=TINYINT}, + + + spec_snap = #{specSnap,jdbcType=VARCHAR}, + + + unit_name = #{unitName,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + record_id = #{recordId,jdbcType=VARCHAR}, + + + batch_number = #{batchNumber,jdbcType=VARCHAR}, + + + source_path = #{sourcePath,jdbcType=VARCHAR}, + + + order_id = #{orderId,jdbcType=VARCHAR}, + + + sub_type = #{subType,jdbcType=TINYINT}, + + + type = #{type,jdbcType=VARCHAR}, + + + left_number = #{leftNumber,jdbcType=INTEGER}, + + + stock_time = #{stockTime,jdbcType=BIGINT}, + + + stock_number = #{stockNumber,jdbcType=DOUBLE}, + + + cost_amount = #{costAmount,jdbcType=DECIMAL}, + + + sales_amount = #{salesAmount,jdbcType=DECIMAL}, + + + operator = #{operator,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + bar_code = #{barCode,jdbcType=VARCHAR}, + + + cover_img = #{coverImg,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + stock_snap = #{stockSnap,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update tb_product_stock_detail + set sku_id = #{skuId,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR}, + product_name = #{productName,jdbcType=VARCHAR}, + is_stock = #{isStock,jdbcType=TINYINT}, + spec_snap = #{specSnap,jdbcType=VARCHAR}, + unit_name = #{unitName,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + record_id = #{recordId,jdbcType=VARCHAR}, + batch_number = #{batchNumber,jdbcType=VARCHAR}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + order_id = #{orderId,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=TINYINT}, + type = #{type,jdbcType=VARCHAR}, + left_number = #{leftNumber,jdbcType=INTEGER}, + stock_time = #{stockTime,jdbcType=BIGINT}, + stock_number = #{stockNumber,jdbcType=DOUBLE}, + cost_amount = #{costAmount,jdbcType=DECIMAL}, + sales_amount = #{salesAmount,jdbcType=DECIMAL}, + operator = #{operator,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + bar_code = #{barCode,jdbcType=VARCHAR}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + stock_snap = #{stockSnap,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update tb_product_stock_detail + set sku_id = #{skuId,jdbcType=VARCHAR}, + product_id = #{productId,jdbcType=VARCHAR}, + product_name = #{productName,jdbcType=VARCHAR}, + is_stock = #{isStock,jdbcType=TINYINT}, + spec_snap = #{specSnap,jdbcType=VARCHAR}, + unit_name = #{unitName,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + record_id = #{recordId,jdbcType=VARCHAR}, + batch_number = #{batchNumber,jdbcType=VARCHAR}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + order_id = #{orderId,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=TINYINT}, + type = #{type,jdbcType=VARCHAR}, + left_number = #{leftNumber,jdbcType=INTEGER}, + stock_time = #{stockTime,jdbcType=BIGINT}, + stock_number = #{stockNumber,jdbcType=DOUBLE}, + cost_amount = #{costAmount,jdbcType=DECIMAL}, + sales_amount = #{salesAmount,jdbcType=DECIMAL}, + operator = #{operator,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + bar_code = #{barCode,jdbcType=VARCHAR}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbProductStockOperateMapper.xml b/src/main/resources/mapper/TbProductStockOperateMapper.xml new file mode 100644 index 0000000..46e38a3 --- /dev/null +++ b/src/main/resources/mapper/TbProductStockOperateMapper.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + id, shop_id, type, sub_type, batch_number, remark, stock_time, operator_snap, created_at, + updated_at, purveyor_id, purveyor_name, status + + + stock_snap + + + + delete from tb_product_stock_operate + where id = #{id,jdbcType=INTEGER} + + + insert into tb_product_stock_operate (id, shop_id, type, + sub_type, batch_number, remark, + stock_time, operator_snap, created_at, + updated_at, purveyor_id, purveyor_name, + status, stock_snap) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{subType,jdbcType=TINYINT}, #{batchNumber,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{stockTime,jdbcType=BIGINT}, #{operatorSnap,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{purveyorId,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{stockSnap,jdbcType=LONGVARCHAR}) + + + insert into tb_product_stock_operate + + + id, + + + shop_id, + + + type, + + + sub_type, + + + batch_number, + + + remark, + + + stock_time, + + + operator_snap, + + + created_at, + + + updated_at, + + + purveyor_id, + + + purveyor_name, + + + status, + + + stock_snap, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{subType,jdbcType=TINYINT}, + + + #{batchNumber,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{stockTime,jdbcType=BIGINT}, + + + #{operatorSnap,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{purveyorId,jdbcType=VARCHAR}, + + + #{purveyorName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{stockSnap,jdbcType=LONGVARCHAR}, + + + + + update tb_product_stock_operate + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + sub_type = #{subType,jdbcType=TINYINT}, + + + batch_number = #{batchNumber,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + stock_time = #{stockTime,jdbcType=BIGINT}, + + + operator_snap = #{operatorSnap,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + purveyor_id = #{purveyorId,jdbcType=VARCHAR}, + + + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + stock_snap = #{stockSnap,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_product_stock_operate + set shop_id = #{shopId,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=TINYINT}, + batch_number = #{batchNumber,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + stock_time = #{stockTime,jdbcType=BIGINT}, + operator_snap = #{operatorSnap,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + purveyor_id = #{purveyorId,jdbcType=VARCHAR}, + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + stock_snap = #{stockSnap,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_product_stock_operate + set shop_id = #{shopId,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + sub_type = #{subType,jdbcType=TINYINT}, + batch_number = #{batchNumber,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + stock_time = #{stockTime,jdbcType=BIGINT}, + operator_snap = #{operatorSnap,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + purveyor_id = #{purveyorId,jdbcType=VARCHAR}, + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbReceiptSalesMapper.xml b/src/main/resources/mapper/TbReceiptSalesMapper.xml new file mode 100644 index 0000000..0f0e0c5 --- /dev/null +++ b/src/main/resources/mapper/TbReceiptSalesMapper.xml @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, title, logo, show_contact_info, show_member, show_member_code, show_member_score, + show_member_wallet, footer_remark, show_cash_charge, show_serial_no, big_serial_no, + header_text, header_text_align, footer_text, footer_text_align, footer_image, pre_print, + created_at, updated_at + + + + delete from tb_receipt_sales + where id = #{id,jdbcType=INTEGER} + + + insert into tb_receipt_sales (id, title, logo, + show_contact_info, show_member, show_member_code, + show_member_score, show_member_wallet, footer_remark, + show_cash_charge, show_serial_no, big_serial_no, + header_text, header_text_align, footer_text, + footer_text_align, footer_image, pre_print, + created_at, updated_at) + values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, + #{showContactInfo,jdbcType=BIT}, #{showMember,jdbcType=BIT}, #{showMemberCode,jdbcType=BIT}, + #{showMemberScore,jdbcType=BIT}, #{showMemberWallet,jdbcType=BIT}, #{footerRemark,jdbcType=VARCHAR}, + #{showCashCharge,jdbcType=BIT}, #{showSerialNo,jdbcType=BIT}, #{bigSerialNo,jdbcType=BIT}, + #{headerText,jdbcType=VARCHAR}, #{headerTextAlign,jdbcType=VARCHAR}, #{footerText,jdbcType=VARCHAR}, + #{footerTextAlign,jdbcType=VARCHAR}, #{footerImage,jdbcType=VARCHAR}, #{prePrint,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}) + + + insert into tb_receipt_sales + + + id, + + + title, + + + logo, + + + show_contact_info, + + + show_member, + + + show_member_code, + + + show_member_score, + + + show_member_wallet, + + + footer_remark, + + + show_cash_charge, + + + show_serial_no, + + + big_serial_no, + + + header_text, + + + header_text_align, + + + footer_text, + + + footer_text_align, + + + footer_image, + + + pre_print, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{title,jdbcType=VARCHAR}, + + + #{logo,jdbcType=VARCHAR}, + + + #{showContactInfo,jdbcType=BIT}, + + + #{showMember,jdbcType=BIT}, + + + #{showMemberCode,jdbcType=BIT}, + + + #{showMemberScore,jdbcType=BIT}, + + + #{showMemberWallet,jdbcType=BIT}, + + + #{footerRemark,jdbcType=VARCHAR}, + + + #{showCashCharge,jdbcType=BIT}, + + + #{showSerialNo,jdbcType=BIT}, + + + #{bigSerialNo,jdbcType=BIT}, + + + #{headerText,jdbcType=VARCHAR}, + + + #{headerTextAlign,jdbcType=VARCHAR}, + + + #{footerText,jdbcType=VARCHAR}, + + + #{footerTextAlign,jdbcType=VARCHAR}, + + + #{footerImage,jdbcType=VARCHAR}, + + + #{prePrint,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_receipt_sales + + + title = #{title,jdbcType=VARCHAR}, + + + logo = #{logo,jdbcType=VARCHAR}, + + + show_contact_info = #{showContactInfo,jdbcType=BIT}, + + + show_member = #{showMember,jdbcType=BIT}, + + + show_member_code = #{showMemberCode,jdbcType=BIT}, + + + show_member_score = #{showMemberScore,jdbcType=BIT}, + + + show_member_wallet = #{showMemberWallet,jdbcType=BIT}, + + + footer_remark = #{footerRemark,jdbcType=VARCHAR}, + + + show_cash_charge = #{showCashCharge,jdbcType=BIT}, + + + show_serial_no = #{showSerialNo,jdbcType=BIT}, + + + big_serial_no = #{bigSerialNo,jdbcType=BIT}, + + + header_text = #{headerText,jdbcType=VARCHAR}, + + + header_text_align = #{headerTextAlign,jdbcType=VARCHAR}, + + + footer_text = #{footerText,jdbcType=VARCHAR}, + + + footer_text_align = #{footerTextAlign,jdbcType=VARCHAR}, + + + footer_image = #{footerImage,jdbcType=VARCHAR}, + + + pre_print = #{prePrint,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_receipt_sales + set title = #{title,jdbcType=VARCHAR}, + logo = #{logo,jdbcType=VARCHAR}, + show_contact_info = #{showContactInfo,jdbcType=BIT}, + show_member = #{showMember,jdbcType=BIT}, + show_member_code = #{showMemberCode,jdbcType=BIT}, + show_member_score = #{showMemberScore,jdbcType=BIT}, + show_member_wallet = #{showMemberWallet,jdbcType=BIT}, + footer_remark = #{footerRemark,jdbcType=VARCHAR}, + show_cash_charge = #{showCashCharge,jdbcType=BIT}, + show_serial_no = #{showSerialNo,jdbcType=BIT}, + big_serial_no = #{bigSerialNo,jdbcType=BIT}, + header_text = #{headerText,jdbcType=VARCHAR}, + header_text_align = #{headerTextAlign,jdbcType=VARCHAR}, + footer_text = #{footerText,jdbcType=VARCHAR}, + footer_text_align = #{footerTextAlign,jdbcType=VARCHAR}, + footer_image = #{footerImage,jdbcType=VARCHAR}, + pre_print = #{prePrint,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbRenewalsPayLogMapper.xml b/src/main/resources/mapper/TbRenewalsPayLogMapper.xml new file mode 100644 index 0000000..ea09b30 --- /dev/null +++ b/src/main/resources/mapper/TbRenewalsPayLogMapper.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + id, pay_type, shop_id, order_id, open_id, user_id, transaction_id, amount, status, + remark, attach, expired_at, created_at, updated_at + + + + delete from tb_renewals_pay_log + where id = #{id,jdbcType=INTEGER} + + + insert into tb_renewals_pay_log (id, pay_type, shop_id, + order_id, open_id, user_id, + transaction_id, amount, status, + remark, attach, expired_at, + created_at, updated_at) + values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{orderId,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, + #{transactionId,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, + #{remark,jdbcType=VARCHAR}, #{attach,jdbcType=VARCHAR}, #{expiredAt,jdbcType=BIGINT}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}) + + + insert into tb_renewals_pay_log + + + id, + + + pay_type, + + + shop_id, + + + order_id, + + + open_id, + + + user_id, + + + transaction_id, + + + amount, + + + status, + + + remark, + + + attach, + + + expired_at, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{payType,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{orderId,jdbcType=VARCHAR}, + + + #{openId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{transactionId,jdbcType=VARCHAR}, + + + #{amount,jdbcType=DECIMAL}, + + + #{status,jdbcType=TINYINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{attach,jdbcType=VARCHAR}, + + + #{expiredAt,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_renewals_pay_log + + + pay_type = #{payType,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + order_id = #{orderId,jdbcType=VARCHAR}, + + + open_id = #{openId,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + transaction_id = #{transactionId,jdbcType=VARCHAR}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + status = #{status,jdbcType=TINYINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + attach = #{attach,jdbcType=VARCHAR}, + + + expired_at = #{expiredAt,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_renewals_pay_log + set pay_type = #{payType,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + order_id = #{orderId,jdbcType=VARCHAR}, + open_id = #{openId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + transaction_id = #{transactionId,jdbcType=VARCHAR}, + amount = #{amount,jdbcType=DECIMAL}, + status = #{status,jdbcType=TINYINT}, + remark = #{remark,jdbcType=VARCHAR}, + attach = #{attach,jdbcType=VARCHAR}, + expired_at = #{expiredAt,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopAreaMapper.xml b/src/main/resources/mapper/TbShopAreaMapper.xml new file mode 100644 index 0000000..3c58470 --- /dev/null +++ b/src/main/resources/mapper/TbShopAreaMapper.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + id, shop_id, sort, name, price, capacity_range, created_at, updated_at + + + view + + + + delete from tb_shop_area + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_area (id, shop_id, sort, + name, price, capacity_range, + created_at, updated_at, view + ) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{price,jdbcType=INTEGER}, #{capacityRange,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{view,jdbcType=LONGVARCHAR} + ) + + + insert into tb_shop_area + + + id, + + + shop_id, + + + sort, + + + name, + + + price, + + + capacity_range, + + + created_at, + + + updated_at, + + + view, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=INTEGER}, + + + #{sort,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{price,jdbcType=INTEGER}, + + + #{capacityRange,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{view,jdbcType=LONGVARCHAR}, + + + + + update tb_shop_area + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + sort = #{sort,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=INTEGER}, + + + capacity_range = #{capacityRange,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + view = #{view,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_area + set shop_id = #{shopId,jdbcType=INTEGER}, + sort = #{sort,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + price = #{price,jdbcType=INTEGER}, + capacity_range = #{capacityRange,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + view = #{view,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_area + set shop_id = #{shopId,jdbcType=INTEGER}, + sort = #{sort,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + price = #{price,jdbcType=INTEGER}, + capacity_range = #{capacityRange,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopCashSpreadMapper.xml b/src/main/resources/mapper/TbShopCashSpreadMapper.xml new file mode 100644 index 0000000..87c41c7 --- /dev/null +++ b/src/main/resources/mapper/TbShopCashSpreadMapper.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + id, created_at, updated_at + + + sale_receipt, triplicate_receipt, screen_config, tag_config, scale_config + + + + delete from tb_shop_cash_spread + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_cash_spread (id, created_at, updated_at, + sale_receipt, triplicate_receipt, + screen_config, tag_config, scale_config + ) + values (#{id,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{saleReceipt,jdbcType=LONGVARCHAR}, #{triplicateReceipt,jdbcType=LONGVARCHAR}, + #{screenConfig,jdbcType=LONGVARCHAR}, #{tagConfig,jdbcType=LONGVARCHAR}, #{scaleConfig,jdbcType=LONGVARCHAR} + ) + + + insert into tb_shop_cash_spread + + + id, + + + created_at, + + + updated_at, + + + sale_receipt, + + + triplicate_receipt, + + + screen_config, + + + tag_config, + + + scale_config, + + + + + #{id,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{saleReceipt,jdbcType=LONGVARCHAR}, + + + #{triplicateReceipt,jdbcType=LONGVARCHAR}, + + + #{screenConfig,jdbcType=LONGVARCHAR}, + + + #{tagConfig,jdbcType=LONGVARCHAR}, + + + #{scaleConfig,jdbcType=LONGVARCHAR}, + + + + + update tb_shop_cash_spread + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR}, + + + triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR}, + + + screen_config = #{screenConfig,jdbcType=LONGVARCHAR}, + + + tag_config = #{tagConfig,jdbcType=LONGVARCHAR}, + + + scale_config = #{scaleConfig,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_cash_spread + set created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR}, + triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR}, + screen_config = #{screenConfig,jdbcType=LONGVARCHAR}, + tag_config = #{tagConfig,jdbcType=LONGVARCHAR}, + scale_config = #{scaleConfig,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_cash_spread + set created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopCategoryMapper.xml b/src/main/resources/mapper/TbShopCategoryMapper.xml new file mode 100644 index 0000000..5dc4db5 --- /dev/null +++ b/src/main/resources/mapper/TbShopCategoryMapper.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + id, name, short_name, tree, pid, pic, merchant_id, shop_id, style, is_show, detail, + sort, key_word, created_at, updated_at + + + + delete from tb_shop_category + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_category (id, name, short_name, + tree, pid, pic, merchant_id, + shop_id, style, is_show, + detail, sort, key_word, + created_at, updated_at) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, + #{tree,jdbcType=INTEGER}, #{pid,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, + #{shopId,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{isShow,jdbcType=TINYINT}, + #{detail,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{keyWord,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}) + + + insert into tb_shop_category + + + id, + + + name, + + + short_name, + + + tree, + + + pid, + + + pic, + + + merchant_id, + + + shop_id, + + + style, + + + is_show, + + + detail, + + + sort, + + + key_word, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{shortName,jdbcType=VARCHAR}, + + + #{tree,jdbcType=INTEGER}, + + + #{pid,jdbcType=VARCHAR}, + + + #{pic,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{style,jdbcType=VARCHAR}, + + + #{isShow,jdbcType=TINYINT}, + + + #{detail,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{keyWord,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_shop_category + + + name = #{name,jdbcType=VARCHAR}, + + + short_name = #{shortName,jdbcType=VARCHAR}, + + + tree = #{tree,jdbcType=INTEGER}, + + + pid = #{pid,jdbcType=VARCHAR}, + + + pic = #{pic,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + style = #{style,jdbcType=VARCHAR}, + + + is_show = #{isShow,jdbcType=TINYINT}, + + + detail = #{detail,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + key_word = #{keyWord,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_category + set name = #{name,jdbcType=VARCHAR}, + short_name = #{shortName,jdbcType=VARCHAR}, + tree = #{tree,jdbcType=INTEGER}, + pid = #{pid,jdbcType=VARCHAR}, + pic = #{pic,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + style = #{style,jdbcType=VARCHAR}, + is_show = #{isShow,jdbcType=TINYINT}, + detail = #{detail,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + key_word = #{keyWord,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopCurrencyMapper.xml b/src/main/resources/mapper/TbShopCurrencyMapper.xml new file mode 100644 index 0000000..503f4e0 --- /dev/null +++ b/src/main/resources/mapper/TbShopCurrencyMapper.xml @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, shop_id, prepare_amount, currency, decimals_digits, discount_round, merchant_id, + small_change, enable_custom_discount, max_discount, max_percent, biz_duration, allow_web_pay, + is_auto_to_zero, is_include_tax_price, tax_number, created_at, updated_at, auto_lock_screen, + voice_notification + + + discount_configs, service_charge + + + + delete from tb_shop_currency + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_currency (id, shop_id, prepare_amount, + currency, decimals_digits, discount_round, + merchant_id, small_change, enable_custom_discount, + max_discount, max_percent, biz_duration, + allow_web_pay, is_auto_to_zero, is_include_tax_price, + tax_number, created_at, updated_at, + auto_lock_screen, voice_notification, discount_configs, + service_charge) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{prepareAmount,jdbcType=DECIMAL}, + #{currency,jdbcType=VARCHAR}, #{decimalsDigits,jdbcType=TINYINT}, #{discountRound,jdbcType=VARCHAR}, + #{merchantId,jdbcType=VARCHAR}, #{smallChange,jdbcType=TINYINT}, #{enableCustomDiscount,jdbcType=TINYINT}, + #{maxDiscount,jdbcType=DECIMAL}, #{maxPercent,jdbcType=DOUBLE}, #{bizDuration,jdbcType=VARCHAR}, + #{allowWebPay,jdbcType=TINYINT}, #{isAutoToZero,jdbcType=TINYINT}, #{isIncludeTaxPrice,jdbcType=TINYINT}, + #{taxNumber,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{autoLockScreen,jdbcType=TINYINT}, #{voiceNotification,jdbcType=TINYINT}, #{discountConfigs,jdbcType=LONGVARCHAR}, + #{serviceCharge,jdbcType=LONGVARCHAR}) + + + insert into tb_shop_currency + + + id, + + + shop_id, + + + prepare_amount, + + + currency, + + + decimals_digits, + + + discount_round, + + + merchant_id, + + + small_change, + + + enable_custom_discount, + + + max_discount, + + + max_percent, + + + biz_duration, + + + allow_web_pay, + + + is_auto_to_zero, + + + is_include_tax_price, + + + tax_number, + + + created_at, + + + updated_at, + + + auto_lock_screen, + + + voice_notification, + + + discount_configs, + + + service_charge, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{prepareAmount,jdbcType=DECIMAL}, + + + #{currency,jdbcType=VARCHAR}, + + + #{decimalsDigits,jdbcType=TINYINT}, + + + #{discountRound,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{smallChange,jdbcType=TINYINT}, + + + #{enableCustomDiscount,jdbcType=TINYINT}, + + + #{maxDiscount,jdbcType=DECIMAL}, + + + #{maxPercent,jdbcType=DOUBLE}, + + + #{bizDuration,jdbcType=VARCHAR}, + + + #{allowWebPay,jdbcType=TINYINT}, + + + #{isAutoToZero,jdbcType=TINYINT}, + + + #{isIncludeTaxPrice,jdbcType=TINYINT}, + + + #{taxNumber,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{autoLockScreen,jdbcType=TINYINT}, + + + #{voiceNotification,jdbcType=TINYINT}, + + + #{discountConfigs,jdbcType=LONGVARCHAR}, + + + #{serviceCharge,jdbcType=LONGVARCHAR}, + + + + + update tb_shop_currency + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + prepare_amount = #{prepareAmount,jdbcType=DECIMAL}, + + + currency = #{currency,jdbcType=VARCHAR}, + + + decimals_digits = #{decimalsDigits,jdbcType=TINYINT}, + + + discount_round = #{discountRound,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + small_change = #{smallChange,jdbcType=TINYINT}, + + + enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT}, + + + max_discount = #{maxDiscount,jdbcType=DECIMAL}, + + + max_percent = #{maxPercent,jdbcType=DOUBLE}, + + + biz_duration = #{bizDuration,jdbcType=VARCHAR}, + + + allow_web_pay = #{allowWebPay,jdbcType=TINYINT}, + + + is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT}, + + + is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT}, + + + tax_number = #{taxNumber,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT}, + + + voice_notification = #{voiceNotification,jdbcType=TINYINT}, + + + discount_configs = #{discountConfigs,jdbcType=LONGVARCHAR}, + + + service_charge = #{serviceCharge,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_currency + set shop_id = #{shopId,jdbcType=VARCHAR}, + prepare_amount = #{prepareAmount,jdbcType=DECIMAL}, + currency = #{currency,jdbcType=VARCHAR}, + decimals_digits = #{decimalsDigits,jdbcType=TINYINT}, + discount_round = #{discountRound,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + small_change = #{smallChange,jdbcType=TINYINT}, + enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT}, + max_discount = #{maxDiscount,jdbcType=DECIMAL}, + max_percent = #{maxPercent,jdbcType=DOUBLE}, + biz_duration = #{bizDuration,jdbcType=VARCHAR}, + allow_web_pay = #{allowWebPay,jdbcType=TINYINT}, + is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT}, + is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT}, + tax_number = #{taxNumber,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT}, + voice_notification = #{voiceNotification,jdbcType=TINYINT}, + discount_configs = #{discountConfigs,jdbcType=LONGVARCHAR}, + service_charge = #{serviceCharge,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_currency + set shop_id = #{shopId,jdbcType=VARCHAR}, + prepare_amount = #{prepareAmount,jdbcType=DECIMAL}, + currency = #{currency,jdbcType=VARCHAR}, + decimals_digits = #{decimalsDigits,jdbcType=TINYINT}, + discount_round = #{discountRound,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + small_change = #{smallChange,jdbcType=TINYINT}, + enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT}, + max_discount = #{maxDiscount,jdbcType=DECIMAL}, + max_percent = #{maxPercent,jdbcType=DOUBLE}, + biz_duration = #{bizDuration,jdbcType=VARCHAR}, + allow_web_pay = #{allowWebPay,jdbcType=TINYINT}, + is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT}, + is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT}, + tax_number = #{taxNumber,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT}, + voice_notification = #{voiceNotification,jdbcType=TINYINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopInfoMapper.xml b/src/main/resources/mapper/TbShopInfoMapper.xml new file mode 100644 index 0000000..1fb35ee --- /dev/null +++ b/src/main/resources/mapper/TbShopInfoMapper.xml @@ -0,0 +1,625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, account, shop_code, sub_title, merchant_id, shop_name, chain_name, back_img, + front_img, contact_name, phone, logo, is_deposit, is_supply, cover_img, share_img, + detail, lat, lng, mch_id, register_type, is_wx_ma_independent, address, city, type, + industry, industry_name, business_time, post_time, post_amount_line, on_sale, settle_type, + settle_time, enter_at, expire_at, status, average, order_wait_pay_minute, support_device_number, + distribute_level, created_at, updated_at, proxy_id + + + view + + + + delete from tb_shop_info + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_info (id, account, shop_code, + sub_title, merchant_id, shop_name, + chain_name, back_img, front_img, + contact_name, phone, logo, + is_deposit, is_supply, cover_img, + share_img, detail, lat, + lng, mch_id, register_type, + is_wx_ma_independent, address, city, + type, industry, industry_name, + business_time, post_time, post_amount_line, + on_sale, settle_type, settle_time, + enter_at, expire_at, status, + average, order_wait_pay_minute, support_device_number, + distribute_level, created_at, updated_at, + proxy_id, view) + values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{shopCode,jdbcType=VARCHAR}, + #{subTitle,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR}, + #{chainName,jdbcType=VARCHAR}, #{backImg,jdbcType=VARCHAR}, #{frontImg,jdbcType=VARCHAR}, + #{contactName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, + #{isDeposit,jdbcType=TINYINT}, #{isSupply,jdbcType=TINYINT}, #{coverImg,jdbcType=VARCHAR}, + #{shareImg,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, + #{lng,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{registerType,jdbcType=VARCHAR}, + #{isWxMaIndependent,jdbcType=TINYINT}, #{address,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR}, #{industryName,jdbcType=VARCHAR}, + #{businessTime,jdbcType=VARCHAR}, #{postTime,jdbcType=VARCHAR}, #{postAmountLine,jdbcType=DECIMAL}, + #{onSale,jdbcType=TINYINT}, #{settleType,jdbcType=TINYINT}, #{settleTime,jdbcType=VARCHAR}, + #{enterAt,jdbcType=INTEGER}, #{expireAt,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, + #{average,jdbcType=REAL}, #{orderWaitPayMinute,jdbcType=INTEGER}, #{supportDeviceNumber,jdbcType=INTEGER}, + #{distributeLevel,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{proxyId,jdbcType=VARCHAR}, #{view,jdbcType=LONGVARCHAR}) + + + insert into tb_shop_info + + + id, + + + account, + + + shop_code, + + + sub_title, + + + merchant_id, + + + shop_name, + + + chain_name, + + + back_img, + + + front_img, + + + contact_name, + + + phone, + + + logo, + + + is_deposit, + + + is_supply, + + + cover_img, + + + share_img, + + + detail, + + + lat, + + + lng, + + + mch_id, + + + register_type, + + + is_wx_ma_independent, + + + address, + + + city, + + + type, + + + industry, + + + industry_name, + + + business_time, + + + post_time, + + + post_amount_line, + + + on_sale, + + + settle_type, + + + settle_time, + + + enter_at, + + + expire_at, + + + status, + + + average, + + + order_wait_pay_minute, + + + support_device_number, + + + distribute_level, + + + created_at, + + + updated_at, + + + proxy_id, + + + view, + + + + + #{id,jdbcType=INTEGER}, + + + #{account,jdbcType=VARCHAR}, + + + #{shopCode,jdbcType=VARCHAR}, + + + #{subTitle,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopName,jdbcType=VARCHAR}, + + + #{chainName,jdbcType=VARCHAR}, + + + #{backImg,jdbcType=VARCHAR}, + + + #{frontImg,jdbcType=VARCHAR}, + + + #{contactName,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{logo,jdbcType=VARCHAR}, + + + #{isDeposit,jdbcType=TINYINT}, + + + #{isSupply,jdbcType=TINYINT}, + + + #{coverImg,jdbcType=VARCHAR}, + + + #{shareImg,jdbcType=VARCHAR}, + + + #{detail,jdbcType=VARCHAR}, + + + #{lat,jdbcType=VARCHAR}, + + + #{lng,jdbcType=VARCHAR}, + + + #{mchId,jdbcType=VARCHAR}, + + + #{registerType,jdbcType=VARCHAR}, + + + #{isWxMaIndependent,jdbcType=TINYINT}, + + + #{address,jdbcType=VARCHAR}, + + + #{city,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{industry,jdbcType=VARCHAR}, + + + #{industryName,jdbcType=VARCHAR}, + + + #{businessTime,jdbcType=VARCHAR}, + + + #{postTime,jdbcType=VARCHAR}, + + + #{postAmountLine,jdbcType=DECIMAL}, + + + #{onSale,jdbcType=TINYINT}, + + + #{settleType,jdbcType=TINYINT}, + + + #{settleTime,jdbcType=VARCHAR}, + + + #{enterAt,jdbcType=INTEGER}, + + + #{expireAt,jdbcType=BIGINT}, + + + #{status,jdbcType=TINYINT}, + + + #{average,jdbcType=REAL}, + + + #{orderWaitPayMinute,jdbcType=INTEGER}, + + + #{supportDeviceNumber,jdbcType=INTEGER}, + + + #{distributeLevel,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{proxyId,jdbcType=VARCHAR}, + + + #{view,jdbcType=LONGVARCHAR}, + + + + + update tb_shop_info + + + account = #{account,jdbcType=VARCHAR}, + + + shop_code = #{shopCode,jdbcType=VARCHAR}, + + + sub_title = #{subTitle,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_name = #{shopName,jdbcType=VARCHAR}, + + + chain_name = #{chainName,jdbcType=VARCHAR}, + + + back_img = #{backImg,jdbcType=VARCHAR}, + + + front_img = #{frontImg,jdbcType=VARCHAR}, + + + contact_name = #{contactName,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + logo = #{logo,jdbcType=VARCHAR}, + + + is_deposit = #{isDeposit,jdbcType=TINYINT}, + + + is_supply = #{isSupply,jdbcType=TINYINT}, + + + cover_img = #{coverImg,jdbcType=VARCHAR}, + + + share_img = #{shareImg,jdbcType=VARCHAR}, + + + detail = #{detail,jdbcType=VARCHAR}, + + + lat = #{lat,jdbcType=VARCHAR}, + + + lng = #{lng,jdbcType=VARCHAR}, + + + mch_id = #{mchId,jdbcType=VARCHAR}, + + + register_type = #{registerType,jdbcType=VARCHAR}, + + + is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT}, + + + address = #{address,jdbcType=VARCHAR}, + + + city = #{city,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + industry = #{industry,jdbcType=VARCHAR}, + + + industry_name = #{industryName,jdbcType=VARCHAR}, + + + business_time = #{businessTime,jdbcType=VARCHAR}, + + + post_time = #{postTime,jdbcType=VARCHAR}, + + + post_amount_line = #{postAmountLine,jdbcType=DECIMAL}, + + + on_sale = #{onSale,jdbcType=TINYINT}, + + + settle_type = #{settleType,jdbcType=TINYINT}, + + + settle_time = #{settleTime,jdbcType=VARCHAR}, + + + enter_at = #{enterAt,jdbcType=INTEGER}, + + + expire_at = #{expireAt,jdbcType=BIGINT}, + + + status = #{status,jdbcType=TINYINT}, + + + average = #{average,jdbcType=REAL}, + + + order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER}, + + + support_device_number = #{supportDeviceNumber,jdbcType=INTEGER}, + + + distribute_level = #{distributeLevel,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + proxy_id = #{proxyId,jdbcType=VARCHAR}, + + + view = #{view,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_info + set account = #{account,jdbcType=VARCHAR}, + shop_code = #{shopCode,jdbcType=VARCHAR}, + sub_title = #{subTitle,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_name = #{shopName,jdbcType=VARCHAR}, + chain_name = #{chainName,jdbcType=VARCHAR}, + back_img = #{backImg,jdbcType=VARCHAR}, + front_img = #{frontImg,jdbcType=VARCHAR}, + contact_name = #{contactName,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + logo = #{logo,jdbcType=VARCHAR}, + is_deposit = #{isDeposit,jdbcType=TINYINT}, + is_supply = #{isSupply,jdbcType=TINYINT}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + share_img = #{shareImg,jdbcType=VARCHAR}, + detail = #{detail,jdbcType=VARCHAR}, + lat = #{lat,jdbcType=VARCHAR}, + lng = #{lng,jdbcType=VARCHAR}, + mch_id = #{mchId,jdbcType=VARCHAR}, + register_type = #{registerType,jdbcType=VARCHAR}, + is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT}, + address = #{address,jdbcType=VARCHAR}, + city = #{city,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + industry = #{industry,jdbcType=VARCHAR}, + industry_name = #{industryName,jdbcType=VARCHAR}, + business_time = #{businessTime,jdbcType=VARCHAR}, + post_time = #{postTime,jdbcType=VARCHAR}, + post_amount_line = #{postAmountLine,jdbcType=DECIMAL}, + on_sale = #{onSale,jdbcType=TINYINT}, + settle_type = #{settleType,jdbcType=TINYINT}, + settle_time = #{settleTime,jdbcType=VARCHAR}, + enter_at = #{enterAt,jdbcType=INTEGER}, + expire_at = #{expireAt,jdbcType=BIGINT}, + status = #{status,jdbcType=TINYINT}, + average = #{average,jdbcType=REAL}, + order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER}, + support_device_number = #{supportDeviceNumber,jdbcType=INTEGER}, + distribute_level = #{distributeLevel,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + proxy_id = #{proxyId,jdbcType=VARCHAR}, + view = #{view,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_info + set account = #{account,jdbcType=VARCHAR}, + shop_code = #{shopCode,jdbcType=VARCHAR}, + sub_title = #{subTitle,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_name = #{shopName,jdbcType=VARCHAR}, + chain_name = #{chainName,jdbcType=VARCHAR}, + back_img = #{backImg,jdbcType=VARCHAR}, + front_img = #{frontImg,jdbcType=VARCHAR}, + contact_name = #{contactName,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + logo = #{logo,jdbcType=VARCHAR}, + is_deposit = #{isDeposit,jdbcType=TINYINT}, + is_supply = #{isSupply,jdbcType=TINYINT}, + cover_img = #{coverImg,jdbcType=VARCHAR}, + share_img = #{shareImg,jdbcType=VARCHAR}, + detail = #{detail,jdbcType=VARCHAR}, + lat = #{lat,jdbcType=VARCHAR}, + lng = #{lng,jdbcType=VARCHAR}, + mch_id = #{mchId,jdbcType=VARCHAR}, + register_type = #{registerType,jdbcType=VARCHAR}, + is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT}, + address = #{address,jdbcType=VARCHAR}, + city = #{city,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + industry = #{industry,jdbcType=VARCHAR}, + industry_name = #{industryName,jdbcType=VARCHAR}, + business_time = #{businessTime,jdbcType=VARCHAR}, + post_time = #{postTime,jdbcType=VARCHAR}, + post_amount_line = #{postAmountLine,jdbcType=DECIMAL}, + on_sale = #{onSale,jdbcType=TINYINT}, + settle_type = #{settleType,jdbcType=TINYINT}, + settle_time = #{settleTime,jdbcType=VARCHAR}, + enter_at = #{enterAt,jdbcType=INTEGER}, + expire_at = #{expireAt,jdbcType=BIGINT}, + status = #{status,jdbcType=TINYINT}, + average = #{average,jdbcType=REAL}, + order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER}, + support_device_number = #{supportDeviceNumber,jdbcType=INTEGER}, + distribute_level = #{distributeLevel,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + proxy_id = #{proxyId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopOnlineMapper.xml b/src/main/resources/mapper/TbShopOnlineMapper.xml new file mode 100644 index 0000000..c2d77f6 --- /dev/null +++ b/src/main/resources/mapper/TbShopOnlineMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + shop_id, start_time, end_time, status, create_time, update_time + + + + delete from tb_shop_online + where shop_id = #{shopId,jdbcType=INTEGER} + + + insert into tb_shop_online (shop_id, start_time, end_time, + status, create_time, update_time + ) + values (#{shopId,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, + #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into tb_shop_online + + + shop_id, + + + start_time, + + + end_time, + + + status, + + + create_time, + + + update_time, + + + + + #{shopId,jdbcType=INTEGER}, + + + #{startTime,jdbcType=TIMESTAMP}, + + + #{endTime,jdbcType=TIMESTAMP}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update tb_shop_online + + + start_time = #{startTime,jdbcType=TIMESTAMP}, + + + end_time = #{endTime,jdbcType=TIMESTAMP}, + + + status = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where shop_id = #{shopId,jdbcType=INTEGER} + + + update tb_shop_online + set start_time = #{startTime,jdbcType=TIMESTAMP}, + end_time = #{endTime,jdbcType=TIMESTAMP}, + status = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where shop_id = #{shopId,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopPayTypeMapper.xml b/src/main/resources/mapper/TbShopPayTypeMapper.xml new file mode 100644 index 0000000..843d921 --- /dev/null +++ b/src/main/resources/mapper/TbShopPayTypeMapper.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + id, pay_type, pay_name, is_show_shortcut, shop_id, is_refundable, is_open_cash_drawer, + is_system, is_ideal, is_display, sorts, created_at, updated_at, icon + + + + delete from tb_shop_pay_type + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_pay_type (id, pay_type, pay_name, + is_show_shortcut, shop_id, is_refundable, + is_open_cash_drawer, is_system, is_ideal, + is_display, sorts, created_at, + updated_at, icon) + values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{payName,jdbcType=VARCHAR}, + #{isShowShortcut,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR}, #{isRefundable,jdbcType=TINYINT}, + #{isOpenCashDrawer,jdbcType=TINYINT}, #{isSystem,jdbcType=TINYINT}, #{isIdeal,jdbcType=TINYINT}, + #{isDisplay,jdbcType=TINYINT}, #{sorts,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR}) + + + insert into tb_shop_pay_type + + + id, + + + pay_type, + + + pay_name, + + + is_show_shortcut, + + + shop_id, + + + is_refundable, + + + is_open_cash_drawer, + + + is_system, + + + is_ideal, + + + is_display, + + + sorts, + + + created_at, + + + updated_at, + + + icon, + + + + + #{id,jdbcType=INTEGER}, + + + #{payType,jdbcType=VARCHAR}, + + + #{payName,jdbcType=VARCHAR}, + + + #{isShowShortcut,jdbcType=TINYINT}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{isRefundable,jdbcType=TINYINT}, + + + #{isOpenCashDrawer,jdbcType=TINYINT}, + + + #{isSystem,jdbcType=TINYINT}, + + + #{isIdeal,jdbcType=TINYINT}, + + + #{isDisplay,jdbcType=TINYINT}, + + + #{sorts,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{icon,jdbcType=VARCHAR}, + + + + + update tb_shop_pay_type + + + pay_type = #{payType,jdbcType=VARCHAR}, + + + pay_name = #{payName,jdbcType=VARCHAR}, + + + is_show_shortcut = #{isShowShortcut,jdbcType=TINYINT}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + is_refundable = #{isRefundable,jdbcType=TINYINT}, + + + is_open_cash_drawer = #{isOpenCashDrawer,jdbcType=TINYINT}, + + + is_system = #{isSystem,jdbcType=TINYINT}, + + + is_ideal = #{isIdeal,jdbcType=TINYINT}, + + + is_display = #{isDisplay,jdbcType=TINYINT}, + + + sorts = #{sorts,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_pay_type + set pay_type = #{payType,jdbcType=VARCHAR}, + pay_name = #{payName,jdbcType=VARCHAR}, + is_show_shortcut = #{isShowShortcut,jdbcType=TINYINT}, + shop_id = #{shopId,jdbcType=VARCHAR}, + is_refundable = #{isRefundable,jdbcType=TINYINT}, + is_open_cash_drawer = #{isOpenCashDrawer,jdbcType=TINYINT}, + is_system = #{isSystem,jdbcType=TINYINT}, + is_ideal = #{isIdeal,jdbcType=TINYINT}, + is_display = #{isDisplay,jdbcType=TINYINT}, + sorts = #{sorts,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + icon = #{icon,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopPurveyorMapper.xml b/src/main/resources/mapper/TbShopPurveyorMapper.xml new file mode 100644 index 0000000..79962a9 --- /dev/null +++ b/src/main/resources/mapper/TbShopPurveyorMapper.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + id, shop_id, sort, name, purveyor_name, purveyor_telephone, period, address, tip, + remark, created_at, updated_at, last_transact_at + + + + delete from tb_shop_purveyor + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_purveyor (id, shop_id, sort, + name, purveyor_name, purveyor_telephone, + period, address, tip, + remark, created_at, updated_at, + last_transact_at) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR}, #{purveyorTelephone,jdbcType=VARCHAR}, + #{period,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{tip,jdbcType=VARCHAR}, + #{remark,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{lastTransactAt,jdbcType=BIGINT}) + + + insert into tb_shop_purveyor + + + id, + + + shop_id, + + + sort, + + + name, + + + purveyor_name, + + + purveyor_telephone, + + + period, + + + address, + + + tip, + + + remark, + + + created_at, + + + updated_at, + + + last_transact_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{purveyorName,jdbcType=VARCHAR}, + + + #{purveyorTelephone,jdbcType=VARCHAR}, + + + #{period,jdbcType=INTEGER}, + + + #{address,jdbcType=VARCHAR}, + + + #{tip,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{lastTransactAt,jdbcType=BIGINT}, + + + + + update tb_shop_purveyor + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + + + purveyor_telephone = #{purveyorTelephone,jdbcType=VARCHAR}, + + + period = #{period,jdbcType=INTEGER}, + + + address = #{address,jdbcType=VARCHAR}, + + + tip = #{tip,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + last_transact_at = #{lastTransactAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_purveyor + set shop_id = #{shopId,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + purveyor_telephone = #{purveyorTelephone,jdbcType=VARCHAR}, + period = #{period,jdbcType=INTEGER}, + address = #{address,jdbcType=VARCHAR}, + tip = #{tip,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + last_transact_at = #{lastTransactAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopPurveyorTransactMapper.xml b/src/main/resources/mapper/TbShopPurveyorTransactMapper.xml new file mode 100644 index 0000000..d29303a --- /dev/null +++ b/src/main/resources/mapper/TbShopPurveyorTransactMapper.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + id, shop_id, purveyor_name, purveyor_id, status, remark, created_at, updated_at, + total_amount, wait_amount, paid_amount, paid_at, type + + + + delete from tb_shop_purveyor_transact + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_purveyor_transact (id, shop_id, purveyor_name, + purveyor_id, status, remark, + created_at, updated_at, total_amount, + wait_amount, paid_amount, paid_at, + type) + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR}, + #{purveyorId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, + #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{totalAmount,jdbcType=DECIMAL}, + #{waitAmount,jdbcType=DECIMAL}, #{paidAmount,jdbcType=DECIMAL}, #{paidAt,jdbcType=BIGINT}, + #{type,jdbcType=VARCHAR}) + + + insert into tb_shop_purveyor_transact + + + id, + + + shop_id, + + + purveyor_name, + + + purveyor_id, + + + status, + + + remark, + + + created_at, + + + updated_at, + + + total_amount, + + + wait_amount, + + + paid_amount, + + + paid_at, + + + type, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{purveyorName,jdbcType=VARCHAR}, + + + #{purveyorId,jdbcType=VARCHAR}, + + + #{status,jdbcType=TINYINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{totalAmount,jdbcType=DECIMAL}, + + + #{waitAmount,jdbcType=DECIMAL}, + + + #{paidAmount,jdbcType=DECIMAL}, + + + #{paidAt,jdbcType=BIGINT}, + + + #{type,jdbcType=VARCHAR}, + + + + + update tb_shop_purveyor_transact + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + + + purveyor_id = #{purveyorId,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=TINYINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + total_amount = #{totalAmount,jdbcType=DECIMAL}, + + + wait_amount = #{waitAmount,jdbcType=DECIMAL}, + + + paid_amount = #{paidAmount,jdbcType=DECIMAL}, + + + paid_at = #{paidAt,jdbcType=BIGINT}, + + + type = #{type,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_purveyor_transact + set shop_id = #{shopId,jdbcType=VARCHAR}, + purveyor_name = #{purveyorName,jdbcType=VARCHAR}, + purveyor_id = #{purveyorId,jdbcType=VARCHAR}, + status = #{status,jdbcType=TINYINT}, + remark = #{remark,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + total_amount = #{totalAmount,jdbcType=DECIMAL}, + wait_amount = #{waitAmount,jdbcType=DECIMAL}, + paid_amount = #{paidAmount,jdbcType=DECIMAL}, + paid_at = #{paidAt,jdbcType=BIGINT}, + type = #{type,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopTableMapper.xml b/src/main/resources/mapper/TbShopTableMapper.xml new file mode 100644 index 0000000..aee6013 --- /dev/null +++ b/src/main/resources/mapper/TbShopTableMapper.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + id, name, shop_id, max_capacity, sort, area_id, is_predate, predate_amount, status, + type, amount, perhour, view, created_at, updated_at + + + + delete from tb_shop_table + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_table (id, name, shop_id, + max_capacity, sort, area_id, + is_predate, predate_amount, status, + type, amount, perhour, + view, created_at, updated_at + ) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{shopId,jdbcType=INTEGER}, + #{maxCapacity,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{areaId,jdbcType=INTEGER}, + #{isPredate,jdbcType=TINYINT}, #{predateAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{amount,jdbcType=DECIMAL}, #{perhour,jdbcType=DECIMAL}, + #{view,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT} + ) + + + insert into tb_shop_table + + + id, + + + name, + + + shop_id, + + + max_capacity, + + + sort, + + + area_id, + + + is_predate, + + + predate_amount, + + + status, + + + type, + + + amount, + + + perhour, + + + view, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=INTEGER}, + + + #{maxCapacity,jdbcType=INTEGER}, + + + #{sort,jdbcType=INTEGER}, + + + #{areaId,jdbcType=INTEGER}, + + + #{isPredate,jdbcType=TINYINT}, + + + #{predateAmount,jdbcType=DECIMAL}, + + + #{status,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{amount,jdbcType=DECIMAL}, + + + #{perhour,jdbcType=DECIMAL}, + + + #{view,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_shop_table + + + name = #{name,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=INTEGER}, + + + max_capacity = #{maxCapacity,jdbcType=INTEGER}, + + + sort = #{sort,jdbcType=INTEGER}, + + + area_id = #{areaId,jdbcType=INTEGER}, + + + is_predate = #{isPredate,jdbcType=TINYINT}, + + + predate_amount = #{predateAmount,jdbcType=DECIMAL}, + + + status = #{status,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + perhour = #{perhour,jdbcType=DECIMAL}, + + + view = #{view,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_table + set name = #{name,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=INTEGER}, + max_capacity = #{maxCapacity,jdbcType=INTEGER}, + sort = #{sort,jdbcType=INTEGER}, + area_id = #{areaId,jdbcType=INTEGER}, + is_predate = #{isPredate,jdbcType=TINYINT}, + predate_amount = #{predateAmount,jdbcType=DECIMAL}, + status = #{status,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + amount = #{amount,jdbcType=DECIMAL}, + perhour = #{perhour,jdbcType=DECIMAL}, + view = #{view,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopUnitMapper.xml b/src/main/resources/mapper/TbShopUnitMapper.xml new file mode 100644 index 0000000..8630f61 --- /dev/null +++ b/src/main/resources/mapper/TbShopUnitMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + id, name, decimals_digits, unit_type, is_system, status, merchant_id, shop_id, created_at, + updated_at + + + + delete from tb_shop_unit + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_unit (id, name, decimals_digits, + unit_type, is_system, status, + merchant_id, shop_id, created_at, + updated_at) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{decimalsDigits,jdbcType=INTEGER}, + #{unitType,jdbcType=VARCHAR}, #{isSystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, + #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}) + + + insert into tb_shop_unit + + + id, + + + name, + + + decimals_digits, + + + unit_type, + + + is_system, + + + status, + + + merchant_id, + + + shop_id, + + + created_at, + + + updated_at, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{decimalsDigits,jdbcType=INTEGER}, + + + #{unitType,jdbcType=VARCHAR}, + + + #{isSystem,jdbcType=TINYINT}, + + + #{status,jdbcType=TINYINT}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + + + update tb_shop_unit + + + name = #{name,jdbcType=VARCHAR}, + + + decimals_digits = #{decimalsDigits,jdbcType=INTEGER}, + + + unit_type = #{unitType,jdbcType=VARCHAR}, + + + is_system = #{isSystem,jdbcType=TINYINT}, + + + status = #{status,jdbcType=TINYINT}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_unit + set name = #{name,jdbcType=VARCHAR}, + decimals_digits = #{decimalsDigits,jdbcType=INTEGER}, + unit_type = #{unitType,jdbcType=VARCHAR}, + is_system = #{isSystem,jdbcType=TINYINT}, + status = #{status,jdbcType=TINYINT}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopUserFlowMapper.xml b/src/main/resources/mapper/TbShopUserFlowMapper.xml new file mode 100644 index 0000000..c395a1f --- /dev/null +++ b/src/main/resources/mapper/TbShopUserFlowMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + id, shop_user_id, amount, balance, biz_code, biz_name, create_time + + + + delete from tb_shop_user_flow + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_user_flow (id, shop_user_id, amount, + balance, biz_code, biz_name, + create_time) + values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, + #{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}) + + + insert into tb_shop_user_flow + + + id, + + + shop_user_id, + + + amount, + + + balance, + + + biz_code, + + + biz_name, + + + create_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{shopUserId,jdbcType=INTEGER}, + + + #{amount,jdbcType=DECIMAL}, + + + #{balance,jdbcType=DECIMAL}, + + + #{bizCode,jdbcType=VARCHAR}, + + + #{bizName,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update tb_shop_user_flow + + + shop_user_id = #{shopUserId,jdbcType=INTEGER}, + + + amount = #{amount,jdbcType=DECIMAL}, + + + balance = #{balance,jdbcType=DECIMAL}, + + + biz_code = #{bizCode,jdbcType=VARCHAR}, + + + biz_name = #{bizName,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user_flow + set shop_user_id = #{shopUserId,jdbcType=INTEGER}, + amount = #{amount,jdbcType=DECIMAL}, + balance = #{balance,jdbcType=DECIMAL}, + biz_code = #{bizCode,jdbcType=VARCHAR}, + biz_name = #{bizName,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbShopUserMapper.xml b/src/main/resources/mapper/TbShopUserMapper.xml new file mode 100644 index 0000000..fe23608 --- /dev/null +++ b/src/main/resources/mapper/TbShopUserMapper.xml @@ -0,0 +1,376 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, amount, credit_amount, consume_amount, consume_number, level_consume, status, + merchant_id, shop_id, user_id, parent_id, parent_level, name, head_img, sex, birth_day, + telephone, is_vip, code, is_attention, attention_at, is_shareholder, level, distribute_type, + sort, created_at, updated_at, mini_open_id + + + + delete from tb_shop_user + where id = #{id,jdbcType=INTEGER} + + + insert into tb_shop_user (id, amount, credit_amount, + consume_amount, consume_number, level_consume, + status, merchant_id, shop_id, + user_id, parent_id, parent_level, + name, head_img, sex, + birth_day, telephone, is_vip, + code, is_attention, attention_at, + is_shareholder, level, distribute_type, + sort, created_at, updated_at, + mini_open_id) + values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{creditAmount,jdbcType=DECIMAL}, + #{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, #{levelConsume,jdbcType=DECIMAL}, + #{status,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{userId,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{parentLevel,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, + #{birthDay,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, #{isVip,jdbcType=TINYINT}, + #{code,jdbcType=VARCHAR}, #{isAttention,jdbcType=TINYINT}, #{attentionAt,jdbcType=INTEGER}, + #{isShareholder,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{distributeType,jdbcType=VARCHAR}, + #{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{miniOpenId,jdbcType=VARCHAR}) + + + insert into tb_shop_user + + + id, + + + amount, + + + credit_amount, + + + consume_amount, + + + consume_number, + + + level_consume, + + + status, + + + merchant_id, + + + shop_id, + + + user_id, + + + parent_id, + + + parent_level, + + + name, + + + head_img, + + + sex, + + + birth_day, + + + telephone, + + + is_vip, + + + code, + + + is_attention, + + + attention_at, + + + is_shareholder, + + + level, + + + distribute_type, + + + sort, + + + created_at, + + + updated_at, + + + mini_open_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{amount,jdbcType=DECIMAL}, + + + #{creditAmount,jdbcType=DECIMAL}, + + + #{consumeAmount,jdbcType=DECIMAL}, + + + #{consumeNumber,jdbcType=INTEGER}, + + + #{levelConsume,jdbcType=DECIMAL}, + + + #{status,jdbcType=TINYINT}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{parentLevel,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{headImg,jdbcType=VARCHAR}, + + + #{sex,jdbcType=TINYINT}, + + + #{birthDay,jdbcType=VARCHAR}, + + + #{telephone,jdbcType=VARCHAR}, + + + #{isVip,jdbcType=TINYINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{isAttention,jdbcType=TINYINT}, + + + #{attentionAt,jdbcType=INTEGER}, + + + #{isShareholder,jdbcType=TINYINT}, + + + #{level,jdbcType=TINYINT}, + + + #{distributeType,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{miniOpenId,jdbcType=VARCHAR}, + + + + + update tb_shop_user + + + amount = #{amount,jdbcType=DECIMAL}, + + + credit_amount = #{creditAmount,jdbcType=DECIMAL}, + + + consume_amount = #{consumeAmount,jdbcType=DECIMAL}, + + + consume_number = #{consumeNumber,jdbcType=INTEGER}, + + + level_consume = #{levelConsume,jdbcType=DECIMAL}, + + + status = #{status,jdbcType=TINYINT}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + parent_level = #{parentLevel,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + head_img = #{headImg,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=TINYINT}, + + + birth_day = #{birthDay,jdbcType=VARCHAR}, + + + telephone = #{telephone,jdbcType=VARCHAR}, + + + is_vip = #{isVip,jdbcType=TINYINT}, + + + code = #{code,jdbcType=VARCHAR}, + + + is_attention = #{isAttention,jdbcType=TINYINT}, + + + attention_at = #{attentionAt,jdbcType=INTEGER}, + + + is_shareholder = #{isShareholder,jdbcType=TINYINT}, + + + level = #{level,jdbcType=TINYINT}, + + + distribute_type = #{distributeType,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + mini_open_id = #{miniOpenId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_shop_user + set amount = #{amount,jdbcType=DECIMAL}, + credit_amount = #{creditAmount,jdbcType=DECIMAL}, + consume_amount = #{consumeAmount,jdbcType=DECIMAL}, + consume_number = #{consumeNumber,jdbcType=INTEGER}, + level_consume = #{levelConsume,jdbcType=DECIMAL}, + status = #{status,jdbcType=TINYINT}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + parent_level = #{parentLevel,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + head_img = #{headImg,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=TINYINT}, + birth_day = #{birthDay,jdbcType=VARCHAR}, + telephone = #{telephone,jdbcType=VARCHAR}, + is_vip = #{isVip,jdbcType=TINYINT}, + code = #{code,jdbcType=VARCHAR}, + is_attention = #{isAttention,jdbcType=TINYINT}, + attention_at = #{attentionAt,jdbcType=INTEGER}, + is_shareholder = #{isShareholder,jdbcType=TINYINT}, + level = #{level,jdbcType=TINYINT}, + distribute_type = #{distributeType,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + mini_open_id = #{miniOpenId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbTokenMapper.xml b/src/main/resources/mapper/TbTokenMapper.xml new file mode 100644 index 0000000..844d3ba --- /dev/null +++ b/src/main/resources/mapper/TbTokenMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + id, account_id, staff_id, client_type, token, ip, status, create_time, update_time + + + + delete from tb_token + where id = #{id,jdbcType=INTEGER} + + + insert into tb_token (id, account_id, staff_id, + client_type, token, ip, + status, create_time, update_time + ) + values (#{id,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{staffId,jdbcType=INTEGER}, + #{clientType,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into tb_token + + + id, + + + account_id, + + + staff_id, + + + client_type, + + + token, + + + ip, + + + status, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{accountId,jdbcType=INTEGER}, + + + #{staffId,jdbcType=INTEGER}, + + + #{clientType,jdbcType=VARCHAR}, + + + #{token,jdbcType=VARCHAR}, + + + #{ip,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update tb_token + + + account_id = #{accountId,jdbcType=INTEGER}, + + + staff_id = #{staffId,jdbcType=INTEGER}, + + + client_type = #{clientType,jdbcType=VARCHAR}, + + + token = #{token,jdbcType=VARCHAR}, + + + ip = #{ip,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_token + set account_id = #{accountId,jdbcType=INTEGER}, + staff_id = #{staffId,jdbcType=INTEGER}, + client_type = #{clientType,jdbcType=VARCHAR}, + token = #{token,jdbcType=VARCHAR}, + ip = #{ip,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbUserInfoMapper.xml b/src/main/resources/mapper/TbUserInfoMapper.xml new file mode 100644 index 0000000..e8e4ce3 --- /dev/null +++ b/src/main/resources/mapper/TbUserInfoMapper.xml @@ -0,0 +1,567 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, amount, charge_amount, line_of_credit, consume_amount, consume_number, total_score, + lock_score, card_no, card_password, level_id, head_img, nick_name, telephone, wx_ma_app_id, + birth_day, sex, mini_app_open_id, open_id, union_id, code, type, identify, status, + parent_id, parent_level, parent_type, project_id, merchant_id, is_resource, is_online, + is_vip, vip_effect_at, tips, source_path, is_sales_person, is_attention_mp, city, + search_word, last_log_in_at, last_leave_at, created_at, updated_at, bind_parent_at, + grand_parent_id + + + + delete from tb_user_info + where id = #{id,jdbcType=INTEGER} + + + insert into tb_user_info (id, amount, charge_amount, + line_of_credit, consume_amount, consume_number, + total_score, lock_score, card_no, + card_password, level_id, head_img, + nick_name, telephone, wx_ma_app_id, + birth_day, sex, mini_app_open_id, + open_id, union_id, code, + type, identify, status, + parent_id, parent_level, parent_type, + project_id, merchant_id, is_resource, + is_online, is_vip, vip_effect_at, + tips, source_path, is_sales_person, + is_attention_mp, city, search_word, + last_log_in_at, last_leave_at, created_at, + updated_at, bind_parent_at, grand_parent_id + ) + values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{chargeAmount,jdbcType=DECIMAL}, + #{lineOfCredit,jdbcType=DECIMAL}, #{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, + #{totalScore,jdbcType=INTEGER}, #{lockScore,jdbcType=INTEGER}, #{cardNo,jdbcType=VARCHAR}, + #{cardPassword,jdbcType=VARCHAR}, #{levelId,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR}, + #{nickName,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, #{wxMaAppId,jdbcType=VARCHAR}, + #{birthDay,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, #{miniAppOpenId,jdbcType=VARCHAR}, + #{openId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{identify,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, + #{parentId,jdbcType=VARCHAR}, #{parentLevel,jdbcType=VARCHAR}, #{parentType,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{isResource,jdbcType=TINYINT}, + #{isOnline,jdbcType=TINYINT}, #{isVip,jdbcType=TINYINT}, #{vipEffectAt,jdbcType=INTEGER}, + #{tips,jdbcType=VARCHAR}, #{sourcePath,jdbcType=VARCHAR}, #{isSalesPerson,jdbcType=TINYINT}, + #{isAttentionMp,jdbcType=TINYINT}, #{city,jdbcType=VARCHAR}, #{searchWord,jdbcType=VARCHAR}, + #{lastLogInAt,jdbcType=BIGINT}, #{lastLeaveAt,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{bindParentAt,jdbcType=BIGINT}, #{grandParentId,jdbcType=VARCHAR} + ) + + + insert into tb_user_info + + + id, + + + amount, + + + charge_amount, + + + line_of_credit, + + + consume_amount, + + + consume_number, + + + total_score, + + + lock_score, + + + card_no, + + + card_password, + + + level_id, + + + head_img, + + + nick_name, + + + telephone, + + + wx_ma_app_id, + + + birth_day, + + + sex, + + + mini_app_open_id, + + + open_id, + + + union_id, + + + code, + + + type, + + + identify, + + + status, + + + parent_id, + + + parent_level, + + + parent_type, + + + project_id, + + + merchant_id, + + + is_resource, + + + is_online, + + + is_vip, + + + vip_effect_at, + + + tips, + + + source_path, + + + is_sales_person, + + + is_attention_mp, + + + city, + + + search_word, + + + last_log_in_at, + + + last_leave_at, + + + created_at, + + + updated_at, + + + bind_parent_at, + + + grand_parent_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{amount,jdbcType=DECIMAL}, + + + #{chargeAmount,jdbcType=DECIMAL}, + + + #{lineOfCredit,jdbcType=DECIMAL}, + + + #{consumeAmount,jdbcType=DECIMAL}, + + + #{consumeNumber,jdbcType=INTEGER}, + + + #{totalScore,jdbcType=INTEGER}, + + + #{lockScore,jdbcType=INTEGER}, + + + #{cardNo,jdbcType=VARCHAR}, + + + #{cardPassword,jdbcType=VARCHAR}, + + + #{levelId,jdbcType=VARCHAR}, + + + #{headImg,jdbcType=VARCHAR}, + + + #{nickName,jdbcType=VARCHAR}, + + + #{telephone,jdbcType=VARCHAR}, + + + #{wxMaAppId,jdbcType=VARCHAR}, + + + #{birthDay,jdbcType=VARCHAR}, + + + #{sex,jdbcType=TINYINT}, + + + #{miniAppOpenId,jdbcType=VARCHAR}, + + + #{openId,jdbcType=VARCHAR}, + + + #{unionId,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{identify,jdbcType=TINYINT}, + + + #{status,jdbcType=TINYINT}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{parentLevel,jdbcType=VARCHAR}, + + + #{parentType,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{isResource,jdbcType=TINYINT}, + + + #{isOnline,jdbcType=TINYINT}, + + + #{isVip,jdbcType=TINYINT}, + + + #{vipEffectAt,jdbcType=INTEGER}, + + + #{tips,jdbcType=VARCHAR}, + + + #{sourcePath,jdbcType=VARCHAR}, + + + #{isSalesPerson,jdbcType=TINYINT}, + + + #{isAttentionMp,jdbcType=TINYINT}, + + + #{city,jdbcType=VARCHAR}, + + + #{searchWord,jdbcType=VARCHAR}, + + + #{lastLogInAt,jdbcType=BIGINT}, + + + #{lastLeaveAt,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{bindParentAt,jdbcType=BIGINT}, + + + #{grandParentId,jdbcType=VARCHAR}, + + + + + update tb_user_info + + + amount = #{amount,jdbcType=DECIMAL}, + + + charge_amount = #{chargeAmount,jdbcType=DECIMAL}, + + + line_of_credit = #{lineOfCredit,jdbcType=DECIMAL}, + + + consume_amount = #{consumeAmount,jdbcType=DECIMAL}, + + + consume_number = #{consumeNumber,jdbcType=INTEGER}, + + + total_score = #{totalScore,jdbcType=INTEGER}, + + + lock_score = #{lockScore,jdbcType=INTEGER}, + + + card_no = #{cardNo,jdbcType=VARCHAR}, + + + card_password = #{cardPassword,jdbcType=VARCHAR}, + + + level_id = #{levelId,jdbcType=VARCHAR}, + + + head_img = #{headImg,jdbcType=VARCHAR}, + + + nick_name = #{nickName,jdbcType=VARCHAR}, + + + telephone = #{telephone,jdbcType=VARCHAR}, + + + wx_ma_app_id = #{wxMaAppId,jdbcType=VARCHAR}, + + + birth_day = #{birthDay,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=TINYINT}, + + + mini_app_open_id = #{miniAppOpenId,jdbcType=VARCHAR}, + + + open_id = #{openId,jdbcType=VARCHAR}, + + + union_id = #{unionId,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + identify = #{identify,jdbcType=TINYINT}, + + + status = #{status,jdbcType=TINYINT}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + parent_level = #{parentLevel,jdbcType=VARCHAR}, + + + parent_type = #{parentType,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + is_resource = #{isResource,jdbcType=TINYINT}, + + + is_online = #{isOnline,jdbcType=TINYINT}, + + + is_vip = #{isVip,jdbcType=TINYINT}, + + + vip_effect_at = #{vipEffectAt,jdbcType=INTEGER}, + + + tips = #{tips,jdbcType=VARCHAR}, + + + source_path = #{sourcePath,jdbcType=VARCHAR}, + + + is_sales_person = #{isSalesPerson,jdbcType=TINYINT}, + + + is_attention_mp = #{isAttentionMp,jdbcType=TINYINT}, + + + city = #{city,jdbcType=VARCHAR}, + + + search_word = #{searchWord,jdbcType=VARCHAR}, + + + last_log_in_at = #{lastLogInAt,jdbcType=BIGINT}, + + + last_leave_at = #{lastLeaveAt,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + bind_parent_at = #{bindParentAt,jdbcType=BIGINT}, + + + grand_parent_id = #{grandParentId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_user_info + set amount = #{amount,jdbcType=DECIMAL}, + charge_amount = #{chargeAmount,jdbcType=DECIMAL}, + line_of_credit = #{lineOfCredit,jdbcType=DECIMAL}, + consume_amount = #{consumeAmount,jdbcType=DECIMAL}, + consume_number = #{consumeNumber,jdbcType=INTEGER}, + total_score = #{totalScore,jdbcType=INTEGER}, + lock_score = #{lockScore,jdbcType=INTEGER}, + card_no = #{cardNo,jdbcType=VARCHAR}, + card_password = #{cardPassword,jdbcType=VARCHAR}, + level_id = #{levelId,jdbcType=VARCHAR}, + head_img = #{headImg,jdbcType=VARCHAR}, + nick_name = #{nickName,jdbcType=VARCHAR}, + telephone = #{telephone,jdbcType=VARCHAR}, + wx_ma_app_id = #{wxMaAppId,jdbcType=VARCHAR}, + birth_day = #{birthDay,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=TINYINT}, + mini_app_open_id = #{miniAppOpenId,jdbcType=VARCHAR}, + open_id = #{openId,jdbcType=VARCHAR}, + union_id = #{unionId,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + identify = #{identify,jdbcType=TINYINT}, + status = #{status,jdbcType=TINYINT}, + parent_id = #{parentId,jdbcType=VARCHAR}, + parent_level = #{parentLevel,jdbcType=VARCHAR}, + parent_type = #{parentType,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + is_resource = #{isResource,jdbcType=TINYINT}, + is_online = #{isOnline,jdbcType=TINYINT}, + is_vip = #{isVip,jdbcType=TINYINT}, + vip_effect_at = #{vipEffectAt,jdbcType=INTEGER}, + tips = #{tips,jdbcType=VARCHAR}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + is_sales_person = #{isSalesPerson,jdbcType=TINYINT}, + is_attention_mp = #{isAttentionMp,jdbcType=TINYINT}, + city = #{city,jdbcType=VARCHAR}, + search_word = #{searchWord,jdbcType=VARCHAR}, + last_log_in_at = #{lastLogInAt,jdbcType=BIGINT}, + last_leave_at = #{lastLeaveAt,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + bind_parent_at = #{bindParentAt,jdbcType=BIGINT}, + grand_parent_id = #{grandParentId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TbmerchantAccountMapper.xml b/src/main/resources/mapper/TbmerchantAccountMapper.xml new file mode 100644 index 0000000..1a5a139 --- /dev/null +++ b/src/main/resources/mapper/TbmerchantAccountMapper.xml @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile, + name, sex, email, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able, + created_at, updated_at + + + head_img + + + + delete from tb_merchant_account + where id = #{id,jdbcType=INTEGER} + + + insert into tb_merchant_account (id, account, password, + merchant_id, shop_id, shop_snap, + is_admin, is_mercantile, name, + sex, email, telephone, + status, sort, role_id, last_login_at, + mp_open_id, msg_able, created_at, + updated_at, head_img) + values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, + #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{shopSnap,jdbcType=VARCHAR}, + #{isAdmin,jdbcType=TINYINT}, #{isMercantile,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR}, + #{sex,jdbcType=TINYINT}, #{email,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, + #{status,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{lastLoginAt,jdbcType=INTEGER}, + #{mpOpenId,jdbcType=VARCHAR}, #{msgAble,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{headImg,jdbcType=LONGVARCHAR}) + + + insert into tb_merchant_account + + + id, + + + account, + + + password, + + + merchant_id, + + + shop_id, + + + shop_snap, + + + is_admin, + + + is_mercantile, + + + name, + + + sex, + + + email, + + + telephone, + + + status, + + + sort, + + + role_id, + + + last_login_at, + + + mp_open_id, + + + msg_able, + + + created_at, + + + updated_at, + + + head_img, + + + + + #{id,jdbcType=INTEGER}, + + + #{account,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{shopSnap,jdbcType=VARCHAR}, + + + #{isAdmin,jdbcType=TINYINT}, + + + #{isMercantile,jdbcType=TINYINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{sex,jdbcType=TINYINT}, + + + #{email,jdbcType=VARCHAR}, + + + #{telephone,jdbcType=VARCHAR}, + + + #{status,jdbcType=BIT}, + + + #{sort,jdbcType=INTEGER}, + + + #{roleId,jdbcType=INTEGER}, + + + #{lastLoginAt,jdbcType=INTEGER}, + + + #{mpOpenId,jdbcType=VARCHAR}, + + + #{msgAble,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{headImg,jdbcType=LONGVARCHAR}, + + + + + update tb_merchant_account + + + account = #{account,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + shop_snap = #{shopSnap,jdbcType=VARCHAR}, + + + is_admin = #{isAdmin,jdbcType=TINYINT}, + + + is_mercantile = #{isMercantile,jdbcType=TINYINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=TINYINT}, + + + email = #{email,jdbcType=VARCHAR}, + + + telephone = #{telephone,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=BIT}, + + + sort = #{sort,jdbcType=INTEGER}, + + + role_id = #{roleId,jdbcType=INTEGER}, + + + last_login_at = #{lastLoginAt,jdbcType=INTEGER}, + + + mp_open_id = #{mpOpenId,jdbcType=VARCHAR}, + + + msg_able = #{msgAble,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + head_img = #{headImg,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tb_merchant_account + set account = #{account,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + shop_snap = #{shopSnap,jdbcType=VARCHAR}, + is_admin = #{isAdmin,jdbcType=TINYINT}, + is_mercantile = #{isMercantile,jdbcType=TINYINT}, + name = #{name,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=TINYINT}, + email = #{email,jdbcType=VARCHAR}, + telephone = #{telephone,jdbcType=VARCHAR}, + status = #{status,jdbcType=BIT}, + sort = #{sort,jdbcType=INTEGER}, + role_id = #{roleId,jdbcType=INTEGER}, + last_login_at = #{lastLoginAt,jdbcType=INTEGER}, + mp_open_id = #{mpOpenId,jdbcType=VARCHAR}, + msg_able = #{msgAble,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + head_img = #{headImg,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tb_merchant_account + set account = #{account,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + shop_snap = #{shopSnap,jdbcType=VARCHAR}, + is_admin = #{isAdmin,jdbcType=TINYINT}, + is_mercantile = #{isMercantile,jdbcType=TINYINT}, + name = #{name,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=TINYINT}, + email = #{email,jdbcType=VARCHAR}, + telephone = #{telephone,jdbcType=VARCHAR}, + status = #{status,jdbcType=BIT}, + sort = #{sort,jdbcType=INTEGER}, + role_id = #{roleId,jdbcType=INTEGER}, + last_login_at = #{lastLoginAt,jdbcType=INTEGER}, + mp_open_id = #{mpOpenId,jdbcType=VARCHAR}, + msg_able = #{msgAble,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ToolAlipayConfigMapper.xml b/src/main/resources/mapper/ToolAlipayConfigMapper.xml new file mode 100644 index 0000000..195605e --- /dev/null +++ b/src/main/resources/mapper/ToolAlipayConfigMapper.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + config_id, app_id, charset, format, gateway_url, notify_url, return_url, sign_type, + sys_service_provider_id + + + private_key, public_key + + + + delete from tool_alipay_config + where config_id = #{configId,jdbcType=BIGINT} + + + insert into tool_alipay_config (config_id, app_id, charset, + format, gateway_url, notify_url, + return_url, sign_type, sys_service_provider_id, + private_key, public_key) + values (#{configId,jdbcType=BIGINT}, #{appId,jdbcType=VARCHAR}, #{charset,jdbcType=VARCHAR}, + #{format,jdbcType=VARCHAR}, #{gatewayUrl,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, + #{returnUrl,jdbcType=VARCHAR}, #{signType,jdbcType=VARCHAR}, #{sysServiceProviderId,jdbcType=VARCHAR}, + #{privateKey,jdbcType=LONGVARCHAR}, #{publicKey,jdbcType=LONGVARCHAR}) + + + insert into tool_alipay_config + + + config_id, + + + app_id, + + + charset, + + + format, + + + gateway_url, + + + notify_url, + + + return_url, + + + sign_type, + + + sys_service_provider_id, + + + private_key, + + + public_key, + + + + + #{configId,jdbcType=BIGINT}, + + + #{appId,jdbcType=VARCHAR}, + + + #{charset,jdbcType=VARCHAR}, + + + #{format,jdbcType=VARCHAR}, + + + #{gatewayUrl,jdbcType=VARCHAR}, + + + #{notifyUrl,jdbcType=VARCHAR}, + + + #{returnUrl,jdbcType=VARCHAR}, + + + #{signType,jdbcType=VARCHAR}, + + + #{sysServiceProviderId,jdbcType=VARCHAR}, + + + #{privateKey,jdbcType=LONGVARCHAR}, + + + #{publicKey,jdbcType=LONGVARCHAR}, + + + + + update tool_alipay_config + + + app_id = #{appId,jdbcType=VARCHAR}, + + + charset = #{charset,jdbcType=VARCHAR}, + + + format = #{format,jdbcType=VARCHAR}, + + + gateway_url = #{gatewayUrl,jdbcType=VARCHAR}, + + + notify_url = #{notifyUrl,jdbcType=VARCHAR}, + + + return_url = #{returnUrl,jdbcType=VARCHAR}, + + + sign_type = #{signType,jdbcType=VARCHAR}, + + + sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR}, + + + private_key = #{privateKey,jdbcType=LONGVARCHAR}, + + + public_key = #{publicKey,jdbcType=LONGVARCHAR}, + + + where config_id = #{configId,jdbcType=BIGINT} + + + update tool_alipay_config + set app_id = #{appId,jdbcType=VARCHAR}, + charset = #{charset,jdbcType=VARCHAR}, + format = #{format,jdbcType=VARCHAR}, + gateway_url = #{gatewayUrl,jdbcType=VARCHAR}, + notify_url = #{notifyUrl,jdbcType=VARCHAR}, + return_url = #{returnUrl,jdbcType=VARCHAR}, + sign_type = #{signType,jdbcType=VARCHAR}, + sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR}, + private_key = #{privateKey,jdbcType=LONGVARCHAR}, + public_key = #{publicKey,jdbcType=LONGVARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + + update tool_alipay_config + set app_id = #{appId,jdbcType=VARCHAR}, + charset = #{charset,jdbcType=VARCHAR}, + format = #{format,jdbcType=VARCHAR}, + gateway_url = #{gatewayUrl,jdbcType=VARCHAR}, + notify_url = #{notifyUrl,jdbcType=VARCHAR}, + return_url = #{returnUrl,jdbcType=VARCHAR}, + sign_type = #{signType,jdbcType=VARCHAR}, + sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ToolEmailConfigMapper.xml b/src/main/resources/mapper/ToolEmailConfigMapper.xml new file mode 100644 index 0000000..7d7c9ea --- /dev/null +++ b/src/main/resources/mapper/ToolEmailConfigMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + config_id, from_user, host, pass, port, user + + + + delete from tool_email_config + where config_id = #{configId,jdbcType=BIGINT} + + + insert into tool_email_config (config_id, from_user, host, + pass, port, user) + values (#{configId,jdbcType=BIGINT}, #{fromUser,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR}, + #{pass,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{user,jdbcType=VARCHAR}) + + + insert into tool_email_config + + + config_id, + + + from_user, + + + host, + + + pass, + + + port, + + + user, + + + + + #{configId,jdbcType=BIGINT}, + + + #{fromUser,jdbcType=VARCHAR}, + + + #{host,jdbcType=VARCHAR}, + + + #{pass,jdbcType=VARCHAR}, + + + #{port,jdbcType=VARCHAR}, + + + #{user,jdbcType=VARCHAR}, + + + + + update tool_email_config + + + from_user = #{fromUser,jdbcType=VARCHAR}, + + + host = #{host,jdbcType=VARCHAR}, + + + pass = #{pass,jdbcType=VARCHAR}, + + + port = #{port,jdbcType=VARCHAR}, + + + user = #{user,jdbcType=VARCHAR}, + + + where config_id = #{configId,jdbcType=BIGINT} + + + update tool_email_config + set from_user = #{fromUser,jdbcType=VARCHAR}, + host = #{host,jdbcType=VARCHAR}, + pass = #{pass,jdbcType=VARCHAR}, + port = #{port,jdbcType=VARCHAR}, + user = #{user,jdbcType=VARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ToolLocalStorageMapper.xml b/src/main/resources/mapper/ToolLocalStorageMapper.xml new file mode 100644 index 0000000..137c007 --- /dev/null +++ b/src/main/resources/mapper/ToolLocalStorageMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + storage_id, real_name, name, suffix, path, type, size, create_by, update_by, create_time, + update_time + + + + delete from tool_local_storage + where storage_id = #{storageId,jdbcType=BIGINT} + + + insert into tool_local_storage (storage_id, real_name, name, + suffix, path, type, + size, create_by, update_by, + create_time, update_time) + values (#{storageId,jdbcType=BIGINT}, #{realName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{suffix,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{size,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into tool_local_storage + + + storage_id, + + + real_name, + + + name, + + + suffix, + + + path, + + + type, + + + size, + + + create_by, + + + update_by, + + + create_time, + + + update_time, + + + + + #{storageId,jdbcType=BIGINT}, + + + #{realName,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{suffix,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{size,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update tool_local_storage + + + real_name = #{realName,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + suffix = #{suffix,jdbcType=VARCHAR}, + + + path = #{path,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where storage_id = #{storageId,jdbcType=BIGINT} + + + update tool_local_storage + set real_name = #{realName,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + suffix = #{suffix,jdbcType=VARCHAR}, + path = #{path,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + size = #{size,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where storage_id = #{storageId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ToolQiniuConfigMapper.xml b/src/main/resources/mapper/ToolQiniuConfigMapper.xml new file mode 100644 index 0000000..2360082 --- /dev/null +++ b/src/main/resources/mapper/ToolQiniuConfigMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + config_id, bucket, host, type, zone + + + access_key, secret_key + + + + delete from tool_qiniu_config + where config_id = #{configId,jdbcType=BIGINT} + + + insert into tool_qiniu_config (config_id, bucket, host, + type, zone, access_key, + secret_key) + values (#{configId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{zone,jdbcType=VARCHAR}, #{accessKey,jdbcType=LONGVARCHAR}, + #{secretKey,jdbcType=LONGVARCHAR}) + + + insert into tool_qiniu_config + + + config_id, + + + bucket, + + + host, + + + type, + + + zone, + + + access_key, + + + secret_key, + + + + + #{configId,jdbcType=BIGINT}, + + + #{bucket,jdbcType=VARCHAR}, + + + #{host,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{zone,jdbcType=VARCHAR}, + + + #{accessKey,jdbcType=LONGVARCHAR}, + + + #{secretKey,jdbcType=LONGVARCHAR}, + + + + + update tool_qiniu_config + + + bucket = #{bucket,jdbcType=VARCHAR}, + + + host = #{host,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + zone = #{zone,jdbcType=VARCHAR}, + + + access_key = #{accessKey,jdbcType=LONGVARCHAR}, + + + secret_key = #{secretKey,jdbcType=LONGVARCHAR}, + + + where config_id = #{configId,jdbcType=BIGINT} + + + update tool_qiniu_config + set bucket = #{bucket,jdbcType=VARCHAR}, + host = #{host,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + zone = #{zone,jdbcType=VARCHAR}, + access_key = #{accessKey,jdbcType=LONGVARCHAR}, + secret_key = #{secretKey,jdbcType=LONGVARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + + update tool_qiniu_config + set bucket = #{bucket,jdbcType=VARCHAR}, + host = #{host,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + zone = #{zone,jdbcType=VARCHAR} + where config_id = #{configId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ToolQiniuContentMapper.xml b/src/main/resources/mapper/ToolQiniuContentMapper.xml new file mode 100644 index 0000000..491bc16 --- /dev/null +++ b/src/main/resources/mapper/ToolQiniuContentMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + content_id, bucket, name, size, type, url, suffix, update_time + + + + delete from tool_qiniu_content + where content_id = #{contentId,jdbcType=BIGINT} + + + insert into tool_qiniu_content (content_id, bucket, name, + size, type, url, suffix, + update_time) + values (#{contentId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{size,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{suffix,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into tool_qiniu_content + + + content_id, + + + bucket, + + + name, + + + size, + + + type, + + + url, + + + suffix, + + + update_time, + + + + + #{contentId,jdbcType=BIGINT}, + + + #{bucket,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{size,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{url,jdbcType=VARCHAR}, + + + #{suffix,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update tool_qiniu_content + + + bucket = #{bucket,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + url = #{url,jdbcType=VARCHAR}, + + + suffix = #{suffix,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where content_id = #{contentId,jdbcType=BIGINT} + + + update tool_qiniu_content + set bucket = #{bucket,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + size = #{size,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + url = #{url,jdbcType=VARCHAR}, + suffix = #{suffix,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where content_id = #{contentId,jdbcType=BIGINT} + + \ No newline at end of file