Browse Source

临时提交。

cangku
wangfukang 2 years ago
parent
commit
9ba6f6fa22
  1. 8
      hiver-admin/src/main/resources/application.yml
  2. 11
      hiver-modules/hiver-mall/pom.xml
  3. 79
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
  4. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/controller/ShopRelationsController.java
  5. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/entity/ShopRelations.java
  6. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/mapper/ShopRelationsMapper.java
  7. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/service/ShopRelationsService.java
  8. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/service/impl/ShopRelationsServiceImpl.java
  9. 100
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/QRCodeUtils.java
  10. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/constant/WarehouseConstant.java
  11. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/entity/Warehouse.java
  12. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/entity/WarehouseShop.java
  13. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/mapper/WarehouseMappper.java
  14. 8
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/service/impl/WarehouseServiceImpl.java
  15. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/service/impl/WarehouseShopServiceImpl.java
  16. 10
      hiver-modules/hiver-mall/src/main/resources/mapper/WarehouseMappper.xml
  17. 12
      hiver-modules/hiver-mall/src/main/resources/mapper/WarehouseShopMappper.xml

8
hiver-admin/src/main/resources/application.yml

@ -25,8 +25,8 @@ spring:
timeout-per-shutdown-phase: 10S timeout-per-shutdown-phase: 10S
# 数据源 # 数据源
datasource: datasource:
# url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true # url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
username: reddoor username: reddoor
# Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456 # Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456
password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe)
@ -67,8 +67,8 @@ spring:
ddl-auto: update ddl-auto: update
# Redis 若设有密码自行添加配置password # Redis 若设有密码自行添加配置password
redis: redis:
# host: 154.8.162.157 host: 154.8.162.157
host: 8.140.198.243 # host: 8.140.198.243
password: reddoor168 password: reddoor168
# 数据库索引 默认0 # 数据库索引 默认0
database: 1 database: 1

11
hiver-modules/hiver-mall/pom.xml

@ -28,6 +28,17 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- Other dependencies -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.4.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

79
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java

@ -35,6 +35,11 @@ import cc.hiver.mall.pojo.vo.QueryShopRevenueVO;
import cc.hiver.mall.service.ShopAreaService; import cc.hiver.mall.service.ShopAreaService;
import cc.hiver.mall.service.ShopService; import cc.hiver.mall.service.ShopService;
import cc.hiver.mall.service.ShopUserService; import cc.hiver.mall.service.ShopUserService;
import cc.hiver.mall.warehouse.constant.WarehouseConstant;
import cc.hiver.mall.warehouse.entity.Warehouse;
import cc.hiver.mall.warehouse.entity.WarehouseShop;
import cc.hiver.mall.warehouse.service.WarehouseService;
import cc.hiver.mall.warehouse.service.WarehouseShopService;
import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.text.CharSequenceUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -42,6 +47,7 @@ import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -76,6 +82,12 @@ public class ShopController {
@Autowired @Autowired
private InviteLogService inviteLogService; private InviteLogService inviteLogService;
@Autowired
private WarehouseService warehouseService;
@Autowired
private WarehouseShopService warehouseShopService;
@RequestMapping(value = "/getAll", method = RequestMethod.GET) @RequestMapping(value = "/getAll", method = RequestMethod.GET)
@ApiOperation("获取全部数据") @ApiOperation("获取全部数据")
public Result<List<Shop>> getAll() { public Result<List<Shop>> getAll() {
@ -206,11 +218,54 @@ public class ShopController {
@RequestMapping(value = "/enable", method = RequestMethod.POST) @RequestMapping(value = "/enable", method = RequestMethod.POST)
@ApiOperation("启用店铺") @ApiOperation("启用店铺")
@Transactional
public Result enable(@RequestParam String id) { public Result enable(@RequestParam String id) {
if(StringUtils.isEmpty(id)){
return ResultUtil.error("id不能为空");
}
try{
final Shop shop = shopService.get(id); final Shop shop = shopService.get(id);
shop.setStatus(ShopConstant.SHOP_STATUS_NORMAL); shop.setStatus(ShopConstant.SHOP_STATUS_NORMAL);
shopService.update(shop); shopService.update(shop);
// 20240803启用店铺,增加默认仓库。
// 根据店铺的ownerId查,有没有仓库,没有直接给一个“默认仓库”
if (StringUtils.isNotEmpty(shop.getShopOwnerId())) {
// 获取店主信息
final User loadUser = securityUtil.getCurrUser();
final User owner = userService.findById(shop.getShopOwnerId());
final List<Warehouse> warehouses = warehouseService.getWarehouseByShopOwnerId(shop.getShopOwnerId());
if (warehouses.isEmpty()) {
final Warehouse warehouse = new Warehouse();
warehouse.setCreateBy(loadUser.getId());
warehouse.setCreateByName(loadUser.getNickname());
warehouse.setShopOwnerId(shop.getShopOwnerId());
warehouse.setShopOwnerName(owner.getNickname());
warehouse.setWarehouseName("默认仓库");
// 默认为共用
warehouse.setWarehouseStatus(WarehouseConstant.WAREHOUSE_STATUS[0]);
// 默认为启用
warehouse.setIsUse(WarehouseConstant.IS_USE[0]);
warehouse.setSort(0);
warehouseService.addWarehouse(warehouse);
// 增加店铺与仓库的关联关系
final WarehouseShop warehouseShop = new WarehouseShop();
warehouseShop.setCreateBy(loadUser.getId());
warehouseShop.setCreateByName(loadUser.getNickname());
warehouseShop.setShopOwnerId(shop.getShopOwnerId());
warehouseShop.setShopOwnerName(owner.getNickname());
warehouseShop.setShopId(shop.getId());
warehouseShop.setShopName(shop.getShopName());
warehouseShop.setWarehouseId(warehouse.getId());
warehouseShop.setWarehouseName(warehouse.getWarehouseName());
warehouseShopService.addWarehouseShop(warehouseShop);
}
}
return ResultUtil.success("操作成功"); return ResultUtil.success("操作成功");
}catch (Exception e){
log.error(e.getMessage(),e);
return ResultUtil.error("启用失败");
}
} }
@RequestMapping(value = "/disable", method = RequestMethod.POST) @RequestMapping(value = "/disable", method = RequestMethod.POST)
@ -254,22 +309,23 @@ public class ShopController {
@RequestMapping(value = "/getShopRebateBalance", method = RequestMethod.POST) @RequestMapping(value = "/getShopRebateBalance", method = RequestMethod.POST)
@ApiOperation("获取返佣余额及累计返佣") @ApiOperation("获取返佣余额及累计返佣")
public Result getShopRebateBalance(){ public Result getShopRebateBalance() {
final Map<String,String> shopRebateBalance = shopService.getShopRebateBalance(); final Map<String, String> shopRebateBalance = shopService.getShopRebateBalance();
return ResultUtil.data(shopRebateBalance); return ResultUtil.data(shopRebateBalance);
} }
/** /**
* 根据店铺id获取店铺信息 * 根据店铺id获取店铺信息
* @author 王富康 *
* @date 2024/7/27
* @param id * @param id
* @return Result * @return Result
* @author 王富康
* @date 2024/7/27
*/ */
@RequestMapping(value = "/getShopInfoById", method = RequestMethod.POST) @RequestMapping(value = "/getShopInfoById", method = RequestMethod.POST)
@ApiOperation("根据店铺id获取店铺信息") @ApiOperation("根据店铺id获取店铺信息")
public Result getShopInfoById(String id){ public Result getShopInfoById(String id) {
if(StringUtils.isEmpty(id)){ if (StringUtils.isEmpty(id)) {
return ResultUtil.error("店铺id不能为空"); return ResultUtil.error("店铺id不能为空");
} }
final Shop shop = shopService.findById(id); final Shop shop = shopService.findById(id);
@ -278,24 +334,25 @@ public class ShopController {
/** /**
* 更新店铺图标及备注 * 更新店铺图标及备注
* @author 王富康 *
* @date 2024/7/27
* @param shop * @param shop
* @return Result * @return Result
* @author 王富康
* @date 2024/7/27
*/ */
@RequestMapping(value = "/updateShopIconAndRemark", method = RequestMethod.POST) @RequestMapping(value = "/updateShopIconAndRemark", method = RequestMethod.POST)
@ApiOperation("更新店铺图标及备注") @ApiOperation("更新店铺图标及备注")
public Result updateShopIconAndRemark(@RequestBody Shop shop) { public Result updateShopIconAndRemark(@RequestBody Shop shop) {
final String id = shop.getId(); final String id = shop.getId();
if(StringUtils.isEmpty(id)){ if (StringUtils.isEmpty(id)) {
return ResultUtil.error("店铺id不能为空"); return ResultUtil.error("店铺id不能为空");
} }
final Shop oldShop = shopService.get(id); final Shop oldShop = shopService.get(id);
// 20240803 不更新店铺图标,可更新店铺地址 // 20240803 不更新店铺图标,可更新店铺地址
if(shop.getShopAddress() != null){ if (shop.getShopAddress() != null) {
oldShop.setShopAddress(shop.getShopAddress()); oldShop.setShopAddress(shop.getShopAddress());
} }
if(shop.getRemark() != null){ if (shop.getRemark() != null) {
oldShop.setRemark(shop.getRemark()); oldShop.setRemark(shop.getRemark());
} }
shopService.update(oldShop); shopService.update(oldShop);

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/controller/ShopRelationsController.java

@ -0,0 +1,4 @@
package cc.hiver.mall.shoprelations.controller;
public class ShopRelationsController {
}

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/entity/ShopRelations.java

@ -0,0 +1,4 @@
package cc.hiver.mall.shoprelations.entity;
public class ShopRelations {
}

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/mapper/ShopRelationsMapper.java

@ -0,0 +1,4 @@
package cc.hiver.mall.shoprelations.mapper;
public interface ShopRelationsMapper {
}

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/service/ShopRelationsService.java

@ -0,0 +1,4 @@
package cc.hiver.mall.shoprelations.service;
public class ShopRelationsService {
}

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/shoprelations/service/impl/ShopRelationsServiceImpl.java

@ -0,0 +1,4 @@
package cc.hiver.mall.shoprelations.service.impl;
public class ShopRelationsServiceImpl {
}

100
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/QRCodeUtils.java

@ -0,0 +1,100 @@
package cc.hiver.mall.utils;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.WriterException;
import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import lombok.extern.slf4j.Slf4j;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
@Slf4j
public class QRCodeUtils {
public static void main(String[] args) {
//type是1,生成活动详情、报名的二维码,type是2,生成活动签到的二维码
String content = "https://u.wechat.com/EOykWgVw3wwnB_JIawG96wY?1111111111112323232323231111112123132132111";
//获取一个二维码图片
try {
BitMatrix bitMatrix = createCode(content);
BufferedImage qrImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
// 调整图像大小
BufferedImage resizedQrImage = new BufferedImage(250, 250, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = resizedQrImage.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2d.drawImage(qrImage, 0, 0, 250, 250, null);
g2d.dispose();
Path path = FileSystems.getDefault().getPath("测试");
ImageIO.write(resizedQrImage, "png", path.toFile());
}catch (Exception e){
log.error("生成二维码失败",e);
}
}
/**
* 生成二维码
* @param content 二维码的内容
* @return BitMatrix对象
* */
public static BitMatrix createCode(String content) throws IOException {
//二维码的宽高
int width = 200;
int height = 200;
//其他参数,如字符集编码
Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>();
hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
//容错级别为H
hints.put(EncodeHintType.ERROR_CORRECTION , ErrorCorrectionLevel.H);
//白边的宽度,可取0~4
hints.put(EncodeHintType.MARGIN , 0);
BitMatrix bitMatrix = null;
try {
//生成矩阵,因为我的业务场景传来的是编码之后的URL,所以先解码
bitMatrix = new MultiFormatWriter().encode(content,
BarcodeFormat.QR_CODE, width, height, hints);
//bitMatrix = deleteWhite(bitMatrix);
} catch (WriterException e) {
e.printStackTrace();
}
return bitMatrix;
}
/**
* 删除生成的二维码周围的白边根据审美决定是否删除
* @param matrix BitMatrix对象
* @return BitMatrix对象
* */
private static BitMatrix deleteWhite(BitMatrix matrix) {
int[] rec = matrix.getEnclosingRectangle();
int resWidth = rec[2] + 1;
int resHeight = rec[3] + 1;
BitMatrix resMatrix = new BitMatrix(resWidth, resHeight);
resMatrix.clear();
for (int i = 0; i < resWidth; i++) {
for (int j = 0; j < resHeight; j++) {
if (matrix.get(i + rec[0], j + rec[1])) {
resMatrix.set(i, j);
}
}
}
return resMatrix;
}
}

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/constant/WarehouseConstant.java

@ -6,15 +6,15 @@ package cc.hiver.mall.warehouse.constant;
* @author 王富康 * @author 王富康
* @date 2024/8/3 * @date 2024/8/3
*/ */
public class WarehouseConstant { public interface WarehouseConstant {
/** /**
* 是否启用01 * 是否启用01
*/ */
String[] IS_USE = {"0","1"}; int[] IS_USE = {0,1};
/** /**
* 店铺状态0共用1按需分配 * 店铺状态0共用1按需分配
*/ */
String[] WAREHOUSE_STATUS = {"0","1"}; int[] WAREHOUSE_STATUS = {0,0};
} }

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/entity/Warehouse.java

@ -11,6 +11,9 @@ import lombok.Data;
@TableName(value = "t_warehouse", autoResultMap = true) @TableName(value = "t_warehouse", autoResultMap = true)
public class Warehouse extends HiverBaseEntity { public class Warehouse extends HiverBaseEntity {
@ApiModelProperty(value = "创建人名称")
private String createByName;
@ApiModelProperty(value = "仓库名称") @ApiModelProperty(value = "仓库名称")
private String warehouseName; private String warehouseName;

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/entity/WarehouseShop.java

@ -11,6 +11,9 @@ import lombok.Data;
@TableName(value = "t_warehouse_shop", autoResultMap = true) @TableName(value = "t_warehouse_shop", autoResultMap = true)
public class WarehouseShop extends HiverBaseEntity { public class WarehouseShop extends HiverBaseEntity {
@ApiModelProperty(value = "创建人名称")
private String createByName;
@ApiModelProperty(value = "店主id") @ApiModelProperty(value = "店主id")
private String shopOwnerId; private String shopOwnerId;

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/mapper/WarehouseMappper.java

@ -7,11 +7,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface WarehouseMappper extends BaseMapper<Warehouse> { public interface WarehouseMappper extends BaseMapper<Warehouse> {
Warehouse addWarehouse(@Param("warehouse") Warehouse warehouse); int addWarehouse(@Param("warehouse") Warehouse warehouse);
Warehouse updateWarehouse(@Param("warehouse") Warehouse warehouse); int updateWarehouse(@Param("warehouse") Warehouse warehouse);
int deleteWarehouse(@Param("id") String id); int deleteWarehouse(@Param("id") String id);
List<Warehouse> getWarehouseByShopOwnerId(@Param("shopOwnerId") String shopOwnerId); List<Warehouse> getWarehouseByShopOwnerId(@Param("shopOwnerId") String shopOwnerId);
Warehouse getWarehouseById(@Param("id") String id);
} }

8
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/service/impl/WarehouseServiceImpl.java

@ -16,12 +16,16 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override @Override
public Warehouse addWarehouse(Warehouse warehouse) { public Warehouse addWarehouse(Warehouse warehouse) {
return warehouseMappper.addWarehouse(warehouse); final String id = warehouse.getId();
warehouseMappper.insert(warehouse);
return warehouseMappper.getWarehouseById(id);
} }
@Override @Override
public Warehouse updateWarehouse(Warehouse warehouse) { public Warehouse updateWarehouse(Warehouse warehouse) {
return warehouseMappper.updateWarehouse(warehouse); final String id = warehouse.getId();
warehouseMappper.updateById(warehouse);
return warehouseMappper.getWarehouseById(id);
} }
@Override @Override

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/warehouse/service/impl/WarehouseShopServiceImpl.java

@ -16,7 +16,7 @@ public class WarehouseShopServiceImpl implements WarehouseShopService {
@Override @Override
public void addWarehouseShop(WarehouseShop warehouseShop) { public void addWarehouseShop(WarehouseShop warehouseShop) {
warehouseShopMapper.addWarehouseShop(warehouseShop); warehouseShopMapper.insert(warehouseShop);
} }
@Override @Override

10
hiver-modules/hiver-mall/src/main/resources/mapper/WarehouseMappper.xml

@ -32,7 +32,7 @@
values (#{warehouse.id,jdbcType=VARCHAR}, #{warehouse.createBy,jdbcType=VARCHAR},#{warehouse.createByName,jdbcType=VARCHAR}, values (#{warehouse.id,jdbcType=VARCHAR}, #{warehouse.createBy,jdbcType=VARCHAR},#{warehouse.createByName,jdbcType=VARCHAR},
#{warehouse.createTime,jdbcType=TIMESTAMP}, #{warehouse.delFlag,jdbcType=INTEGER}, #{warehouse.updateBy,jdbcType=VARCHAR}, #{warehouse.createTime,jdbcType=TIMESTAMP}, #{warehouse.delFlag,jdbcType=INTEGER}, #{warehouse.updateBy,jdbcType=VARCHAR},
#{warehouse.updateTime,jdbcType=TIMESTAMP}, #{warehouse.warehouseName,jdbcType=VARCHAR}, #{warehouse.warehouseAddress,jdbcType=VARCHAR}, #{warehouse.updateTime,jdbcType=TIMESTAMP}, #{warehouse.warehouseName,jdbcType=VARCHAR}, #{warehouse.warehouseAddress,jdbcType=VARCHAR},
#{warehouse.warehouseStatus,jdbcType=INTEGER}, #{warehouse.isUse,jdbcType=INTEGER}, #{warehouse.shopOwnerId,jdbcType}, #{warehouse.warehouseStatus,jdbcType=INTEGER}, #{warehouse.isUse,jdbcType=INTEGER}, #{warehouse.shopOwnerId,jdbcType=VARCHAR},
#{warehouse.shopOwnerName,jdbcType=VARCHAR}, #{warehouse.remark,jdbcType=VARCHAR}, #{warehouse.sort,jdbcType=INTEGER}) #{warehouse.shopOwnerName,jdbcType=VARCHAR}, #{warehouse.remark,jdbcType=VARCHAR}, #{warehouse.sort,jdbcType=INTEGER})
</insert> </insert>
@ -74,4 +74,12 @@
from t_warehouse from t_warehouse
where shop_owner_id = #{shopOwnerId} where shop_owner_id = #{shopOwnerId}
</select> </select>
<!--根据主键id获取仓库信息-->
<select id="getWarehouseById" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_warehouse
where id = #{id}
</select>
</mapper> </mapper>

12
hiver-modules/hiver-mall/src/main/resources/mapper/WarehouseShopMappper.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.warehouse.mapper.WarehouseShopMappper"> <mapper namespace="cc.hiver.mall.warehouse.mapper.WarehouseShopMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.warehouse.entity.WarehouseShop"> <resultMap id="BaseResultMap" type="cc.hiver.mall.warehouse.entity.WarehouseShop">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" />
@ -34,11 +34,11 @@
insert into t_warehouse_shop (id, create_by, create_by_name, create_time, del_flag, update_by, update_time, insert into t_warehouse_shop (id, create_by, create_by_name, create_time, del_flag, update_by, update_time,
shop_owner_id, shop_owner_name, warehouse_id, warehouse_name, warehouse_address, shop_owner_id, shop_owner_name, warehouse_id, warehouse_name, warehouse_address,
shop_id, shop_name, remark) shop_id, shop_name, remark)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},#{createByName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, values (#{warehouseShop.id,jdbcType=VARCHAR}, #{warehouseShop.createBy,jdbcType=VARCHAR},#{warehouseShop.createByName,jdbcType=VARCHAR},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{warehouseShop.createTime,jdbcType=TIMESTAMP}, #{warehouseShop.delFlag,jdbcType=INTEGER}, #{warehouseShop.updateBy,jdbcType=VARCHAR},
#{shopOwnerId,jdbcType=VARCHAR}, #{shopOwnerName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=VARCHAR}, #{warehouseShop.updateTime,jdbcType=TIMESTAMP},#{warehouseShop.shopOwnerId,jdbcType=VARCHAR}, #{warehouseShop.shopOwnerName,jdbcType=VARCHAR},
#{warehouseName,jdbcType=VARCHAR}, #{warehouseAddress,jdbcType=VARCHAR}, #{warehouseShop.warehouseId,jdbcType=VARCHAR}, #{warehouseShop.warehouseName,jdbcType=VARCHAR}, #{warehouseShop.warehouseAddress,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR}, #{remark,jdbc}) #{warehouseShop.shopId,jdbcType=VARCHAR}, #{warehouseShop.shopName,jdbcType=VARCHAR}, #{warehouseShop.remark,jdbcType=VARCHAR})
</insert> </insert>
<delete id="deleteWarehouseShop" parameterType="java.lang.String"> <delete id="deleteWarehouseShop" parameterType="java.lang.String">

Loading…
Cancel
Save