From e4888b4a93ee054c05eae544d0b5dd70f4227865 Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Thu, 8 Apr 2021 17:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShopCertificationController.java | 111 ++++ .../app/apis/shop/ShopAppController.java | 37 ++ .../ShopCertificationAppController.java | 152 ++++++ .../shopmember/ShopMemberAppController.java | 16 +- .../shopstaff/ShopStaffAppController.java | 25 +- .../IShopCertificationDao.java | 130 +++++ .../dao/shopmember/IShopMemberDao.java | 10 + .../tenlion/dao/shopstaff/IShopStaffDao.java | 9 + .../ShopCertificationBO.java | 194 +++++++ .../pojo/bos/shopstaff/ShopStaffBO.java | 9 + .../ShopCertificationDTO.java | 189 +++++++ .../pojo/dtos/shopstaff/ShopStaffDTO.java | 12 + .../ShopCertificationPO.java | 193 +++++++ .../pojo/pos/shopstaff/ShopStaffPO.java | 11 + .../pojo/vos/shopauditlog/ShopAuditLogVO.java | 1 - .../ShopCertificationVO.java | 159 ++++++ .../impl/ShopAuditLogServiceImpl.java | 14 + .../IShopCertificationService.java | 188 +++++++ .../impl/ShopCertificationServiceImpl.java | 179 +++++++ .../impl/ShopMemberServiceImpl.java | 9 + .../shopstaff/impl/ShopStaffServiceImpl.java | 10 +- .../java/cn/com/tenlion/util/QRCodeUtil.java | 26 +- .../shopauditlog/shopauditlog-mapper.xml | 10 +- .../shop-certification-mapper.xml | 481 ++++++++++++++++++ .../mapper/shopmember/shopmember-mapper.xml | 17 + .../mapper/shopstaff/shopstaff-mapper.xml | 40 +- .../resources/static/route/shop/list.html | 20 +- .../resources/static/route/shop/show.html | 23 +- .../static/route/shopauditlog/audit.html | 123 +++++ .../static/route/shopcertification/list.html | 369 ++++++++++++++ .../static/route/shopcertification/save.html | 237 +++++++++ .../static/route/shopcertification/show.html | 238 +++++++++ .../route/shopcertification/update.html | 254 +++++++++ 33 files changed, 3446 insertions(+), 50 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/controller/api/shopcertification/ShopCertificationController.java create mode 100644 src/main/java/cn/com/tenlion/controller/app/apis/shopcertification/ShopCertificationAppController.java create mode 100644 src/main/java/cn/com/tenlion/dao/shopcertification/IShopCertificationDao.java create mode 100644 src/main/java/cn/com/tenlion/pojo/bos/shopcertification/ShopCertificationBO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/dtos/shopcertification/ShopCertificationDTO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/pos/shopcertification/ShopCertificationPO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/vos/shopcertification/ShopCertificationVO.java create mode 100644 src/main/java/cn/com/tenlion/service/shopcertification/IShopCertificationService.java create mode 100644 src/main/java/cn/com/tenlion/service/shopcertification/impl/ShopCertificationServiceImpl.java create mode 100644 src/main/resources/mybatis/mapper/shopcertification/shop-certification-mapper.xml create mode 100644 src/main/resources/static/route/shopauditlog/audit.html create mode 100644 src/main/resources/static/route/shopcertification/list.html create mode 100644 src/main/resources/static/route/shopcertification/save.html create mode 100644 src/main/resources/static/route/shopcertification/show.html create mode 100644 src/main/resources/static/route/shopcertification/update.html diff --git a/src/main/java/cn/com/tenlion/controller/api/shopcertification/ShopCertificationController.java b/src/main/java/cn/com/tenlion/controller/api/shopcertification/ShopCertificationController.java new file mode 100644 index 0000000..1ddb8a5 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/api/shopcertification/ShopCertificationController.java @@ -0,0 +1,111 @@ +package cn.com.tenlion.controller.api.shopcertification; + +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO; +import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO; +import cn.com.tenlion.service.shopcertification.IShopCertificationService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ShopCertificationController + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "店铺认证接口") +@RestController +@RequestMapping(ISystemConstant.API_PREFIX + "/shopcertification") +public class ShopCertificationController extends DefaultBaseController { + + @Autowired + private IShopCertificationService shopCertificationService; + + @ApiOperation(value = "新增店铺认证", notes = "新增店铺认证接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestBody ShopCertificationVO shopCertificationVO) { + shopCertificationService.save(shopCertificationVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除店铺认证", notes = "删除店铺认证接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@PathVariable("ids") String ids) { + shopCertificationService.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("update/{shopCertificationId}") + @CheckRequestBodyAnnotation + public SuccessResult update(@PathVariable("shopCertificationId") String shopCertificationId, @RequestBody ShopCertificationVO shopCertificationVO) { + shopCertificationService.update(shopCertificationId, shopCertificationVO); + return new SuccessResult(); + } + + @ApiOperation(value = "店铺认证详情", notes = "店铺认证详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{shopCertificationId}") + public ShopCertificationDTO get(@PathVariable("shopCertificationId") String shopCertificationId) { + return shopCertificationService.get(shopCertificationId); + } + + @ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return shopCertificationService.list(params); + } + + @ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return shopCertificationService.listPage(page); + } + + @ApiOperation(value = "店铺认证统计", notes = "店铺认证统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(shopCertificationService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/shop/ShopAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/shop/ShopAppController.java index 347b282..ba6a293 100644 --- a/src/main/java/cn/com/tenlion/controller/app/apis/shop/ShopAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/apis/shop/ShopAppController.java @@ -3,9 +3,11 @@ package cn.com.tenlion.controller.app.apis.shop; import cn.com.tenlion.pojo.dtos.shop.ShopDTO; import cn.com.tenlion.pojo.vos.shop.ShopVO; import cn.com.tenlion.service.shop.IShopService; +import cn.com.tenlion.util.QRCodeUtil; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.app.AppTokenManager; import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.exceptions.ParamsException; import ink.wgink.interfaces.consts.ISystemConstant; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.app.AppTokenUser; @@ -15,6 +17,8 @@ import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -38,6 +42,39 @@ public class ShopAppController extends DefaultBaseController { private IShopService shopService; + + @ApiOperation(value = "获取店铺二维码", notes = "获取店铺二维码接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "shopId", value = "店铺ID", paramType = "path"), + @ApiImplicitParam(name = "type", value = "1员工 2会员", paramType = "path") + }) + @GetMapping("getshopcode/{shopId}/{type}") + public SuccessResultData getShopCode(@RequestHeader("token") String token,@PathVariable("shopId") String shopId,@PathVariable("type") String type) throws Exception{ + JSONObject json = new JSONObject(); + String fileId = ""; + if("1".equals(type)){ + json.put("url","app/shopstaff/save/"+shopId); + json.put("type","1"); + fileId = QRCodeUtil.deStyle1(AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(),json.toString()); + } + if("2".equals(type)){ + json.put("url","app/shopmember/save/"+shopId); + json.put("type","2"); + fileId = QRCodeUtil.deStyle1(AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(),json.toString()); + } + if(StringUtils.isBlank(fileId)){ + throw new ParamsException("获取失败"); + } + return new SuccessResultData(fileId); + } + + + + + + @ApiOperation(value = "我的店铺分页列表", notes = "我的店铺分页列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/shopcertification/ShopCertificationAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/shopcertification/ShopCertificationAppController.java new file mode 100644 index 0000000..02b80cc --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/apis/shopcertification/ShopCertificationAppController.java @@ -0,0 +1,152 @@ +package cn.com.tenlion.controller.app.apis.shopcertification; + +import cn.com.tenlion.util.BusinessLicenseBean; +import cn.com.tenlion.util.OCRBusinessLicenseUtil; +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.exceptions.ParamsException; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.module.file.service.IFileService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.pos.FilePO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO; +import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO; +import cn.com.tenlion.service.shopcertification.IShopCertificationService; +import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ShopCertificationAppController + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "店铺认证接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/shopcertification") +public class ShopCertificationAppController extends DefaultBaseController { + + @Autowired + private IShopCertificationService shopCertificationService; + @Autowired + private IFileService fileService; + + @ApiOperation(value = "营业执照OCR识别", notes = "营业执照OCR识别接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "id", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("businessLicenseOCR/{id}") + public BusinessLicenseBean businessLicenseOCR(@RequestHeader("token") String token,@PathVariable("id") String id){ + Map params = new HashMap(); + params.put("fileId",id); + FilePO filePO = fileService.getPO(params); + if (filePO == null){ + throw new ParamsException("未获取到营业执照"); + } + if (StringUtils.isBlank(filePO.getFilePath())){ + throw new ParamsException("未获取到营业执照"); + } + return OCRBusinessLicenseUtil.businessLicenseFile(filePO.getFilePath()); + } + + + + @ApiOperation(value = "新增店铺认证", notes = "新增店铺认证接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopCertificationVO shopCertificationVO) { + shopCertificationService.save(token, shopCertificationVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除店铺认证(id列表)", notes = "删除店铺认证(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) { + shopCertificationService.remove(token, Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updateshopcertification/{shopCertificationId}") + @CheckRequestBodyAnnotation + public SuccessResult updateShopCertification(@RequestHeader("token") String token, @PathVariable("shopCertificationId") String shopCertificationId, @RequestBody ShopCertificationVO shopCertificationVO) { + shopCertificationService.update(token, shopCertificationId, shopCertificationVO); + return new SuccessResult(); + } + + @ApiOperation(value = "店铺认证详情(通过ID)", notes = "店铺认证详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{shopCertificationId}") + public ShopCertificationDTO get(@RequestHeader("token") String token, @PathVariable("shopCertificationId") String shopCertificationId) { + return shopCertificationService.get(shopCertificationId); + } + + @ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list(@RequestHeader("token") String token) { + Map params = requestParams(); + return shopCertificationService.list(params); + } + + @ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpageshopcertification") + public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return shopCertificationService.listPage(page); + } + + @ApiOperation(value = "店铺认证统计", notes = "店铺认证统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(shopCertificationService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/shopmember/ShopMemberAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/shopmember/ShopMemberAppController.java index 853ee6e..0d0d753 100644 --- a/src/main/java/cn/com/tenlion/controller/app/apis/shopmember/ShopMemberAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/apis/shopmember/ShopMemberAppController.java @@ -1,6 +1,7 @@ package cn.com.tenlion.controller.app.api.shopmember; import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.app.AppTokenManager; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.exceptions.ParamsException; import ink.wgink.interfaces.consts.ISystemConstant; @@ -58,9 +59,18 @@ public class ShopMemberAppController extends DefaultBaseController { @ApiImplicitParam(name = "token", value = "token", paramType = "header") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PostMapping("save") - @CheckRequestBodyAnnotation - public SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopMemberVO shopMemberVO) { + @PostMapping("save/{shopId}") + public SuccessResult save(@RequestHeader("token") String token,@PathVariable("shopId") String shopId) { + String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(); + if(StringUtils.isBlank(userId)){ + throw new ParamsException("请重新登录"); + } + if(StringUtils.isBlank(shopId)){ + throw new ParamsException("系统异常"); + } + ShopMemberVO shopMemberVO = new ShopMemberVO(); + shopMemberVO.setShopId(shopId); + shopMemberVO.setUserId(userId); shopMemberService.save(token, shopMemberVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/shopstaff/ShopStaffAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/shopstaff/ShopStaffAppController.java index 48a2484..63996be 100644 --- a/src/main/java/cn/com/tenlion/controller/app/apis/shopstaff/ShopStaffAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/apis/shopstaff/ShopStaffAppController.java @@ -1,6 +1,7 @@ -package cn.com.tenlion.controller.app.api.shopstaff; +package cn.com.tenlion.controller.app.apis.shopstaff; import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.app.AppTokenManager; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.exceptions.ParamsException; import ink.wgink.interfaces.consts.ISystemConstant; @@ -36,6 +37,7 @@ public class ShopStaffAppController extends DefaultBaseController { @Autowired private IShopStaffService shopStaffService; + @ApiOperation(value = "获取店铺员工列表", notes = "获取店铺员工列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header") @@ -51,19 +53,26 @@ public class ShopStaffAppController extends DefaultBaseController { return shopStaffService.list(params); } - - - - - @ApiOperation(value = "新增", notes = "新增接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PostMapping("save") + @PostMapping("save/{shopId}") @CheckRequestBodyAnnotation - public SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopStaffVO shopStaffVO) { + public SuccessResult save(@RequestHeader("token") String token,@PathVariable("shopId") String shopId) { + String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(); + if(StringUtils.isBlank(userId)){ + throw new ParamsException("请重新登录"); + } + if(StringUtils.isBlank(shopId)){ + throw new ParamsException("系统异常"); + } + ShopStaffVO shopStaffVO = new ShopStaffVO(); + shopStaffVO.setUserId(userId); + shopStaffVO.setShopId(shopId); + shopStaffVO.setIsLeader(0); + shopStaffVO.setIsAdmin(0); shopStaffService.save(token, shopStaffVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/dao/shopcertification/IShopCertificationDao.java b/src/main/java/cn/com/tenlion/dao/shopcertification/IShopCertificationDao.java new file mode 100644 index 0000000..b2f1d7e --- /dev/null +++ b/src/main/java/cn/com/tenlion/dao/shopcertification/IShopCertificationDao.java @@ -0,0 +1,130 @@ +package cn.com.tenlion.dao.shopcertification; + +import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; +import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; +import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO; +import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO; +import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IShopCertificationDao + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@Repository +public interface IShopCertificationDao { + + + /** + * 查询店铺审核状态未审核或者审核通过的记录 + * @param params + * @return + * @throws SearchException + */ + ShopCertificationDTO getByShopIdAndAuditStatus(Map params) throws SearchException; + + + /** + * 新增店铺认证 + * + * @param params + * @throws SaveException + */ + void save(Map params) throws SaveException; + + /** + * 删除店铺认证 + * + * @param params + * @throws RemoveException + */ + void remove(Map params) throws RemoveException; + + /** + * 删除店铺认证(物理) + * + * @param params + * @throws RemoveException + */ + void delete(Map params) throws RemoveException; + + /** + * 修改店铺认证 + * + * @param params + * @throws UpdateException + */ + void update(Map params) throws UpdateException; + + /** + * 店铺认证详情 + * + * @param params + * @return + * @throws SearchException + */ + ShopCertificationDTO get(Map params) throws SearchException; + + /** + * 店铺认证详情 + * + * @param params + * @return + * @throws SearchException + */ + ShopCertificationBO getBO(Map params) throws SearchException; + + /** + * 店铺认证详情 + * + * @param params + * @return + * @throws SearchException + */ + ShopCertificationPO getPO(Map params) throws SearchException; + + /** + * 店铺认证列表 + * + * @param params + * @return + * @throws SearchException + */ + List list(Map params) throws SearchException; + + /** + * 店铺认证列表 + * + * @param params + * @return + * @throws SearchException + */ + List listBO(Map params) throws SearchException; + + /** + * 店铺认证列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPO(Map params) throws SearchException; + + /** + * 店铺认证统计 + * + * @param params + * @return + * @throws SearchException + */ + Integer count(Map params) throws SearchException; + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/shopmember/IShopMemberDao.java b/src/main/java/cn/com/tenlion/dao/shopmember/IShopMemberDao.java index 792e156..3956a13 100644 --- a/src/main/java/cn/com/tenlion/dao/shopmember/IShopMemberDao.java +++ b/src/main/java/cn/com/tenlion/dao/shopmember/IShopMemberDao.java @@ -1,5 +1,6 @@ package cn.com.tenlion.dao.shopmember; +import cn.com.tenlion.pojo.dtos.shopstaff.ShopStaffDTO; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; @@ -22,6 +23,15 @@ import java.util.Map; @Repository public interface IShopMemberDao { + /** + * 根据用户ID和店铺ID查询 + * @param params + * @return + * @throws SearchException + */ + ShopMemberDTO getByUserIdAndShopId(Map params) throws SearchException; + + /** * 新增 * diff --git a/src/main/java/cn/com/tenlion/dao/shopstaff/IShopStaffDao.java b/src/main/java/cn/com/tenlion/dao/shopstaff/IShopStaffDao.java index 6f61739..0252d5f 100644 --- a/src/main/java/cn/com/tenlion/dao/shopstaff/IShopStaffDao.java +++ b/src/main/java/cn/com/tenlion/dao/shopstaff/IShopStaffDao.java @@ -22,6 +22,15 @@ import java.util.Map; @Repository public interface IShopStaffDao { + + /** + * 根据用户ID和店铺ID查询 + * @param params + * @return + * @throws SearchException + */ + ShopStaffDTO getByUserIdAndShopId(Map params) throws SearchException; + /** * 新增 * diff --git a/src/main/java/cn/com/tenlion/pojo/bos/shopcertification/ShopCertificationBO.java b/src/main/java/cn/com/tenlion/pojo/bos/shopcertification/ShopCertificationBO.java new file mode 100644 index 0000000..d2eaa97 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/bos/shopcertification/ShopCertificationBO.java @@ -0,0 +1,194 @@ +package cn.com.tenlion.pojo.bos.shopcertification; + +/** + * + * @ClassName: ShopCertificationBO + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +public class ShopCertificationBO { + + private String shopCertificationId; + private String shopId; + private String certificationId; + private String certificationNumber; + private String certificationName; + private String certificationType; + private String certificationAddress; + private String certificationLegalPerson; + private String certificationCapital; + private String certificationFoundTime; + private String certificationLicenseTerm; + private String certificationBusiness; + private String certificationAuthority; + private String certificationComposition; + private String certificationImage; + private String gmtCreate; + private String creator; + private String gmtModified; + private String modifier; + private Integer isDelete; + + public String getShopCertificationId() { + return shopCertificationId == null ? "" : shopCertificationId.trim(); + } + + public void setShopCertificationId(String shopCertificationId) { + this.shopCertificationId = shopCertificationId; + } + + public String getCertificationId() { + return certificationId == null ? "" : certificationId.trim(); + } + + public void setCertificationId(String certificationId) { + this.certificationId = certificationId; + } + + public String getCertificationNumber() { + return certificationNumber == null ? "" : certificationNumber.trim(); + } + + public void setCertificationNumber(String certificationNumber) { + this.certificationNumber = certificationNumber; + } + + public String getCertificationName() { + return certificationName == null ? "" : certificationName.trim(); + } + + public void setCertificationName(String certificationName) { + this.certificationName = certificationName; + } + + public String getCertificationType() { + return certificationType == null ? "" : certificationType.trim(); + } + + public void setCertificationType(String certificationType) { + this.certificationType = certificationType; + } + + public String getCertificationAddress() { + return certificationAddress == null ? "" : certificationAddress.trim(); + } + + public void setCertificationAddress(String certificationAddress) { + this.certificationAddress = certificationAddress; + } + + public String getCertificationLegalPerson() { + return certificationLegalPerson == null ? "" : certificationLegalPerson.trim(); + } + + public void setCertificationLegalPerson(String certificationLegalPerson) { + this.certificationLegalPerson = certificationLegalPerson; + } + + public String getCertificationCapital() { + return certificationCapital == null ? "" : certificationCapital.trim(); + } + + public void setCertificationCapital(String certificationCapital) { + this.certificationCapital = certificationCapital; + } + + public String getCertificationFoundTime() { + return certificationFoundTime == null ? "" : certificationFoundTime.trim(); + } + + public void setCertificationFoundTime(String certificationFoundTime) { + this.certificationFoundTime = certificationFoundTime; + } + + public String getCertificationLicenseTerm() { + return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim(); + } + + public void setCertificationLicenseTerm(String certificationLicenseTerm) { + this.certificationLicenseTerm = certificationLicenseTerm; + } + + public String getCertificationBusiness() { + return certificationBusiness == null ? "" : certificationBusiness.trim(); + } + + public void setCertificationBusiness(String certificationBusiness) { + this.certificationBusiness = certificationBusiness; + } + + public String getCertificationAuthority() { + return certificationAuthority == null ? "" : certificationAuthority.trim(); + } + + public void setCertificationAuthority(String certificationAuthority) { + this.certificationAuthority = certificationAuthority; + } + + public String getCertificationComposition() { + return certificationComposition == null ? "" : certificationComposition.trim(); + } + + public void setCertificationComposition(String certificationComposition) { + this.certificationComposition = certificationComposition; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public String getCertificationImage() { + return certificationImage; + } + + public void setCertificationImage(String certificationImage) { + this.certificationImage = certificationImage; + } +} diff --git a/src/main/java/cn/com/tenlion/pojo/bos/shopstaff/ShopStaffBO.java b/src/main/java/cn/com/tenlion/pojo/bos/shopstaff/ShopStaffBO.java index 047e8c7..fc9476b 100644 --- a/src/main/java/cn/com/tenlion/pojo/bos/shopstaff/ShopStaffBO.java +++ b/src/main/java/cn/com/tenlion/pojo/bos/shopstaff/ShopStaffBO.java @@ -17,6 +17,7 @@ public class ShopStaffBO { private Integer isLeader; private Integer isAdmin; private Integer auditStatus; + private String auditResult; private String gmtCreate; private String creator; private String gmtModified; @@ -79,6 +80,14 @@ public class ShopStaffBO { this.auditStatus = auditStatus; } + public String getAuditResult() { + return auditResult; + } + + public void setAuditResult(String auditResult) { + this.auditResult = auditResult; + } + public String getGmtCreate() { return gmtCreate == null ? "" : gmtCreate.trim(); } diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/shopcertification/ShopCertificationDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/shopcertification/ShopCertificationDTO.java new file mode 100644 index 0000000..575a94f --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/shopcertification/ShopCertificationDTO.java @@ -0,0 +1,189 @@ +package cn.com.tenlion.pojo.dtos.shopcertification; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: ShopCertificationDTO + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@ApiModel +public class ShopCertificationDTO { + + @ApiModelProperty(name = "shopCertificationId", value = "店铺认证ID") + private String shopCertificationId; + @ApiModelProperty(name = "shopId", value = "店铺ID") + private String shopId; + @ApiModelProperty(name = "shopName", value = "店铺名称") + private String shopName; + @ApiModelProperty(name = "certificationId", value = "统一信用代码") + private String certificationId; + @ApiModelProperty(name = "certificationNumber", value = "证书编号") + private String certificationNumber; + @ApiModelProperty(name = "certificationName", value = "企业名称") + private String certificationName; + @ApiModelProperty(name = "certificationType", value = "企业类型") + private String certificationType; + @ApiModelProperty(name = "certificationAddress", value = "企业地址") + private String certificationAddress; + @ApiModelProperty(name = "certificationLegalPerson", value = "企业法定代表人") + private String certificationLegalPerson; + @ApiModelProperty(name = "certificationCapital", value = "企业注册资本") + private String certificationCapital; + @ApiModelProperty(name = "certificationFoundTime", value = "企业注册时间") + private String certificationFoundTime; + @ApiModelProperty(name = "certificationLicenseTerm", value = "营业期限") + private String certificationLicenseTerm; + @ApiModelProperty(name = "certificationBusiness", value = "企业经营范围") + private String certificationBusiness; + @ApiModelProperty(name = "certificationAuthority", value = "登记机关") + private String certificationAuthority; + @ApiModelProperty(name = "certificationComposition", value = "企业组成形式") + private String certificationComposition; + @ApiModelProperty(name = "营业执照图片", value = "营业执照图片") + private String certificationImage; + @ApiModelProperty(name = "审核状态", value = "0 未审核 1审核通过 -1审核不通过") + private Integer auditStatus; + + + public String getShopCertificationId() { + return shopCertificationId == null ? "" : shopCertificationId.trim(); + } + + public void setShopCertificationId(String shopCertificationId) { + this.shopCertificationId = shopCertificationId; + } + + public String getCertificationId() { + return certificationId == null ? "" : certificationId.trim(); + } + + public void setCertificationId(String certificationId) { + this.certificationId = certificationId; + } + + public String getCertificationNumber() { + return certificationNumber == null ? "" : certificationNumber.trim(); + } + + public void setCertificationNumber(String certificationNumber) { + this.certificationNumber = certificationNumber; + } + + public String getCertificationName() { + return certificationName == null ? "" : certificationName.trim(); + } + + public void setCertificationName(String certificationName) { + this.certificationName = certificationName; + } + + public String getCertificationType() { + return certificationType == null ? "" : certificationType.trim(); + } + + public void setCertificationType(String certificationType) { + this.certificationType = certificationType; + } + + public String getCertificationAddress() { + return certificationAddress == null ? "" : certificationAddress.trim(); + } + + public void setCertificationAddress(String certificationAddress) { + this.certificationAddress = certificationAddress; + } + + public String getCertificationLegalPerson() { + return certificationLegalPerson == null ? "" : certificationLegalPerson.trim(); + } + + public void setCertificationLegalPerson(String certificationLegalPerson) { + this.certificationLegalPerson = certificationLegalPerson; + } + + public String getCertificationCapital() { + return certificationCapital == null ? "" : certificationCapital.trim(); + } + + public void setCertificationCapital(String certificationCapital) { + this.certificationCapital = certificationCapital; + } + + public String getCertificationFoundTime() { + return certificationFoundTime == null ? "" : certificationFoundTime.trim(); + } + + public void setCertificationFoundTime(String certificationFoundTime) { + this.certificationFoundTime = certificationFoundTime; + } + + public String getCertificationLicenseTerm() { + return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim(); + } + + public void setCertificationLicenseTerm(String certificationLicenseTerm) { + this.certificationLicenseTerm = certificationLicenseTerm; + } + + public String getCertificationBusiness() { + return certificationBusiness == null ? "" : certificationBusiness.trim(); + } + + public void setCertificationBusiness(String certificationBusiness) { + this.certificationBusiness = certificationBusiness; + } + + public String getCertificationAuthority() { + return certificationAuthority == null ? "" : certificationAuthority.trim(); + } + + public void setCertificationAuthority(String certificationAuthority) { + this.certificationAuthority = certificationAuthority; + } + + public String getCertificationComposition() { + return certificationComposition == null ? "" : certificationComposition.trim(); + } + + public void setCertificationComposition(String certificationComposition) { + this.certificationComposition = certificationComposition; + } + + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public String getShopName() { + return shopName; + } + + public void setShopName(String shopName) { + this.shopName = shopName; + } + + public String getCertificationImage() { + return certificationImage; + } + + public void setCertificationImage(String certificationImage) { + this.certificationImage = certificationImage; + } + + public Integer getAuditStatus() { + return auditStatus; + } + + public void setAuditStatus(Integer auditStatus) { + this.auditStatus = auditStatus; + } +} diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/shopstaff/ShopStaffDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/shopstaff/ShopStaffDTO.java index a104a72..495a3b5 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/shopstaff/ShopStaffDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/shopstaff/ShopStaffDTO.java @@ -29,6 +29,7 @@ public class ShopStaffDTO { private String positionName; + @ApiModelProperty(name = "isLeader", value = "是否店长(领导) 0否 1是") private Integer isLeader; @ApiModelProperty(name = "isAdmin", value = "是否为管理员") @@ -36,6 +37,9 @@ public class ShopStaffDTO { @ApiModelProperty(name = "auditStatus", value = "审核状态 0未审核 1审核通过 -1审核不通过") private Integer auditStatus; + @ApiModelProperty(name = "auditResult", value = "审核说明") + private String auditResult; + @ApiModelProperty(name = "gmtCreate", value = "创建时间") @@ -103,6 +107,14 @@ public class ShopStaffDTO { this.auditStatus = auditStatus; } + public String getAuditResult() { + return auditResult; + } + + public void setAuditResult(String auditResult) { + this.auditResult = auditResult; + } + public String getGmtCreate() { return gmtCreate == null ? "" : gmtCreate.trim(); } diff --git a/src/main/java/cn/com/tenlion/pojo/pos/shopcertification/ShopCertificationPO.java b/src/main/java/cn/com/tenlion/pojo/pos/shopcertification/ShopCertificationPO.java new file mode 100644 index 0000000..48c1d97 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/pos/shopcertification/ShopCertificationPO.java @@ -0,0 +1,193 @@ +package cn.com.tenlion.pojo.pos.shopcertification; + +/** + * + * @ClassName: ShopCertificationPO + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +public class ShopCertificationPO { + + private String shopCertificationId; + private String shopId; + private String certificationId; + private String certificationNumber; + private String certificationName; + private String certificationType; + private String certificationAddress; + private String certificationLegalPerson; + private String certificationCapital; + private String certificationFoundTime; + private String certificationLicenseTerm; + private String certificationBusiness; + private String certificationAuthority; + private String certificationComposition; + private String certificationImage; + private String gmtCreate; + private String creator; + private String gmtModified; + private String modifier; + private Integer isDelete; + + public String getShopCertificationId() { + return shopCertificationId == null ? "" : shopCertificationId.trim(); + } + + public void setShopCertificationId(String shopCertificationId) { + this.shopCertificationId = shopCertificationId; + } + + public String getCertificationId() { + return certificationId == null ? "" : certificationId.trim(); + } + + public void setCertificationId(String certificationId) { + this.certificationId = certificationId; + } + + public String getCertificationNumber() { + return certificationNumber == null ? "" : certificationNumber.trim(); + } + + public void setCertificationNumber(String certificationNumber) { + this.certificationNumber = certificationNumber; + } + + public String getCertificationName() { + return certificationName == null ? "" : certificationName.trim(); + } + + public void setCertificationName(String certificationName) { + this.certificationName = certificationName; + } + + public String getCertificationType() { + return certificationType == null ? "" : certificationType.trim(); + } + + public void setCertificationType(String certificationType) { + this.certificationType = certificationType; + } + + public String getCertificationAddress() { + return certificationAddress == null ? "" : certificationAddress.trim(); + } + + public void setCertificationAddress(String certificationAddress) { + this.certificationAddress = certificationAddress; + } + + public String getCertificationLegalPerson() { + return certificationLegalPerson == null ? "" : certificationLegalPerson.trim(); + } + + public void setCertificationLegalPerson(String certificationLegalPerson) { + this.certificationLegalPerson = certificationLegalPerson; + } + + public String getCertificationCapital() { + return certificationCapital == null ? "" : certificationCapital.trim(); + } + + public void setCertificationCapital(String certificationCapital) { + this.certificationCapital = certificationCapital; + } + + public String getCertificationFoundTime() { + return certificationFoundTime == null ? "" : certificationFoundTime.trim(); + } + + public void setCertificationFoundTime(String certificationFoundTime) { + this.certificationFoundTime = certificationFoundTime; + } + + public String getCertificationLicenseTerm() { + return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim(); + } + + public void setCertificationLicenseTerm(String certificationLicenseTerm) { + this.certificationLicenseTerm = certificationLicenseTerm; + } + + public String getCertificationBusiness() { + return certificationBusiness == null ? "" : certificationBusiness.trim(); + } + + public void setCertificationBusiness(String certificationBusiness) { + this.certificationBusiness = certificationBusiness; + } + + public String getCertificationAuthority() { + return certificationAuthority == null ? "" : certificationAuthority.trim(); + } + + public void setCertificationAuthority(String certificationAuthority) { + this.certificationAuthority = certificationAuthority; + } + + public String getCertificationComposition() { + return certificationComposition == null ? "" : certificationComposition.trim(); + } + + public void setCertificationComposition(String certificationComposition) { + this.certificationComposition = certificationComposition; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public String getCertificationImage() { + return certificationImage; + } + + public void setCertificationImage(String certificationImage) { + this.certificationImage = certificationImage; + } +} diff --git a/src/main/java/cn/com/tenlion/pojo/pos/shopstaff/ShopStaffPO.java b/src/main/java/cn/com/tenlion/pojo/pos/shopstaff/ShopStaffPO.java index 7a9998f..ccd7445 100644 --- a/src/main/java/cn/com/tenlion/pojo/pos/shopstaff/ShopStaffPO.java +++ b/src/main/java/cn/com/tenlion/pojo/pos/shopstaff/ShopStaffPO.java @@ -1,5 +1,7 @@ package cn.com.tenlion.pojo.pos.shopstaff; +import io.swagger.annotations.ApiModelProperty; + /** * * @ClassName: ShopStaffPO @@ -18,6 +20,7 @@ public class ShopStaffPO { private Integer isLeader; private Integer isAdmin; private Integer auditStatus; + private String auditResult; private String gmtCreate; private String creator; private String gmtModified; @@ -80,6 +83,14 @@ public class ShopStaffPO { this.auditStatus = auditStatus; } + public String getAuditResult() { + return auditResult; + } + + public void setAuditResult(String auditResult) { + this.auditResult = auditResult; + } + public String getGmtCreate() { return gmtCreate == null ? "" : gmtCreate.trim(); } diff --git a/src/main/java/cn/com/tenlion/pojo/vos/shopauditlog/ShopAuditLogVO.java b/src/main/java/cn/com/tenlion/pojo/vos/shopauditlog/ShopAuditLogVO.java index 75b268b..e6afd69 100644 --- a/src/main/java/cn/com/tenlion/pojo/vos/shopauditlog/ShopAuditLogVO.java +++ b/src/main/java/cn/com/tenlion/pojo/vos/shopauditlog/ShopAuditLogVO.java @@ -26,7 +26,6 @@ public class ShopAuditLogVO { @ApiModelProperty(name = "auditResult", value = "审核说明") private String auditResult; @ApiModelProperty(name = "auditDate", value = "审核时间") - @CheckEmptyAnnotation(name = "审核时间", verifyType = "datetime") private String auditDate; public String getShopId() { diff --git a/src/main/java/cn/com/tenlion/pojo/vos/shopcertification/ShopCertificationVO.java b/src/main/java/cn/com/tenlion/pojo/vos/shopcertification/ShopCertificationVO.java new file mode 100644 index 0000000..cafefc9 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/vos/shopcertification/ShopCertificationVO.java @@ -0,0 +1,159 @@ +package cn.com.tenlion.pojo.vos.shopcertification; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: ShopCertificationVO + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@ApiModel +public class ShopCertificationVO { + + @ApiModelProperty(name = "certificationId", value = "统一信用代码") + private String certificationId; + @ApiModelProperty(name = "shopId", value = "店铺ID") + private String shopId; + @ApiModelProperty(name = "certificationNumber", value = "证书编号") + private String certificationNumber; + @ApiModelProperty(name = "certificationName", value = "企业名称") + private String certificationName; + @ApiModelProperty(name = "certificationType", value = "企业类型") + private String certificationType; + @ApiModelProperty(name = "certificationAddress", value = "企业地址") + private String certificationAddress; + @ApiModelProperty(name = "certificationLegalPerson", value = "企业法定代表人") + private String certificationLegalPerson; + @ApiModelProperty(name = "certificationCapital", value = "企业注册资本") + private String certificationCapital; + @ApiModelProperty(name = "certificationFoundTime", value = "企业注册时间") + private String certificationFoundTime; + @ApiModelProperty(name = "certificationLicenseTerm", value = "营业期限") + private String certificationLicenseTerm; + @ApiModelProperty(name = "certificationBusiness", value = "企业经营范围") + private String certificationBusiness; + @ApiModelProperty(name = "certificationAuthority", value = "登记机关") + private String certificationAuthority; + @ApiModelProperty(name = "certificationComposition", value = "企业组成形式") + private String certificationComposition; + @ApiModelProperty(name = "certificationImage", value = "营业执照照片") + private String certificationImage; + + public String getCertificationId() { + return certificationId == null ? "" : certificationId.trim(); + } + + public void setCertificationId(String certificationId) { + this.certificationId = certificationId; + } + + public String getCertificationNumber() { + return certificationNumber == null ? "" : certificationNumber.trim(); + } + + public void setCertificationNumber(String certificationNumber) { + this.certificationNumber = certificationNumber; + } + + public String getCertificationName() { + return certificationName == null ? "" : certificationName.trim(); + } + + public void setCertificationName(String certificationName) { + this.certificationName = certificationName; + } + + public String getCertificationType() { + return certificationType == null ? "" : certificationType.trim(); + } + + public void setCertificationType(String certificationType) { + this.certificationType = certificationType; + } + + public String getCertificationAddress() { + return certificationAddress == null ? "" : certificationAddress.trim(); + } + + public void setCertificationAddress(String certificationAddress) { + this.certificationAddress = certificationAddress; + } + + public String getCertificationLegalPerson() { + return certificationLegalPerson == null ? "" : certificationLegalPerson.trim(); + } + + public void setCertificationLegalPerson(String certificationLegalPerson) { + this.certificationLegalPerson = certificationLegalPerson; + } + + public String getCertificationCapital() { + return certificationCapital == null ? "" : certificationCapital.trim(); + } + + public void setCertificationCapital(String certificationCapital) { + this.certificationCapital = certificationCapital; + } + + public String getCertificationFoundTime() { + return certificationFoundTime == null ? "" : certificationFoundTime.trim(); + } + + public void setCertificationFoundTime(String certificationFoundTime) { + this.certificationFoundTime = certificationFoundTime; + } + + public String getCertificationLicenseTerm() { + return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim(); + } + + public void setCertificationLicenseTerm(String certificationLicenseTerm) { + this.certificationLicenseTerm = certificationLicenseTerm; + } + + public String getCertificationBusiness() { + return certificationBusiness == null ? "" : certificationBusiness.trim(); + } + + public void setCertificationBusiness(String certificationBusiness) { + this.certificationBusiness = certificationBusiness; + } + + public String getCertificationAuthority() { + return certificationAuthority == null ? "" : certificationAuthority.trim(); + } + + public void setCertificationAuthority(String certificationAuthority) { + this.certificationAuthority = certificationAuthority; + } + + public String getCertificationComposition() { + return certificationComposition == null ? "" : certificationComposition.trim(); + } + + public void setCertificationComposition(String certificationComposition) { + this.certificationComposition = certificationComposition; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public String getCertificationImage() { + return certificationImage; + } + + public void setCertificationImage(String certificationImage) { + this.certificationImage = certificationImage; + } +} diff --git a/src/main/java/cn/com/tenlion/service/shopauditlog/impl/ShopAuditLogServiceImpl.java b/src/main/java/cn/com/tenlion/service/shopauditlog/impl/ShopAuditLogServiceImpl.java index 4e8bf29..6f1133f 100644 --- a/src/main/java/cn/com/tenlion/service/shopauditlog/impl/ShopAuditLogServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/shopauditlog/impl/ShopAuditLogServiceImpl.java @@ -1,9 +1,12 @@ package cn.com.tenlion.service.shopauditlog.impl; +import cn.com.tenlion.service.shop.IShopService; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.common.component.SecurityComponent; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.date.DateUtil; import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.UUIDUtil; import cn.com.tenlion.dao.shopauditlog.IShopAuditLogDao; @@ -33,6 +36,11 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop @Autowired private IShopAuditLogDao shopAuditLogDao; + private SecurityComponent securityComponent; + @Autowired + private IShopService shopService; + + @Override public void save(ShopAuditLogVO shopAuditLogVO) { saveReturnId(shopAuditLogVO); @@ -53,12 +61,18 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop String shopAuditLogId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(shopAuditLogVO); params.put("shopAuditLogId", shopAuditLogId); + params.put("auditDate", DateUtil.getTime()); + params.put("auditUser", securityComponent.getCurrentUser().getUserId()); + params.put("auditUserName", securityComponent.getCurrentUser().getUserName()); if (StringUtils.isBlank(token)) { setSaveInfo(params); } else { setAppSaveInfo(token, params); } shopAuditLogDao.save(params); + + + return shopAuditLogId; } diff --git a/src/main/java/cn/com/tenlion/service/shopcertification/IShopCertificationService.java b/src/main/java/cn/com/tenlion/service/shopcertification/IShopCertificationService.java new file mode 100644 index 0000000..3fecc19 --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/shopcertification/IShopCertificationService.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.service.shopcertification; + +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO; +import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO; +import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO; +import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IShopCertificationService + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +public interface IShopCertificationService { + + /** + * 新增店铺认证 + * + * @param shopCertificationVO + * @return + */ + void save(ShopCertificationVO shopCertificationVO); + + /** + * 新增店铺认证 + * + * @param token + * @param shopCertificationVO + * @return + */ + void save(String token, ShopCertificationVO shopCertificationVO); + + /** + * 新增店铺认证 + * + * @param shopCertificationVO + * @return shopCertificationId + */ + String saveReturnId(ShopCertificationVO shopCertificationVO); + + /** + * 新增店铺认证 + * + * @param token + * @param shopCertificationVO + * @return shopCertificationId + */ + String saveReturnId(String token, ShopCertificationVO shopCertificationVO); + + /** + * 删除店铺认证 + * + * @param ids id列表 + * @return + */ + void remove(List ids); + + + /** + * 删除店铺认证 + * + * @param token + * @param ids id列表 + * @return + */ + void remove(String token, List ids); + + /** + * 删除店铺认证(物理删除) + * + * @param ids id列表 + */ + void delete(List ids); + + /** + * 修改店铺认证 + * + * @param shopCertificationId + * @param shopCertificationVO + * @return + */ + void update(String shopCertificationId, ShopCertificationVO shopCertificationVO); + + /** + * 修改店铺认证 + * + * @param token + * @param shopCertificationId + * @param shopCertificationVO + * @return + */ + void update(String token, String shopCertificationId, ShopCertificationVO shopCertificationVO); + + /** + * 店铺认证详情 + * + * @param params 参数Map + * @return + */ + ShopCertificationDTO get(Map params); + + /** + * 店铺认证详情 + * + * @param shopCertificationId + * @return + */ + ShopCertificationDTO get(String shopCertificationId); + + /** + * 店铺认证详情 + * + * @param params 参数Map + * @return + */ + ShopCertificationBO getBO(Map params); + + /** + * 店铺认证详情 + * + * @param shopCertificationId + * @return + */ + ShopCertificationBO getBO(String shopCertificationId); + + /** + * 店铺认证详情 + * + * @param params 参数Map + * @return + */ + ShopCertificationPO getPO(Map params); + + /** + * 店铺认证详情 + * + * @param shopCertificationId + * @return + */ + ShopCertificationPO getPO(String shopCertificationId); + + /** + * 店铺认证列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 店铺认证列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 店铺认证列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 店铺认证分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 店铺认证统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/shopcertification/impl/ShopCertificationServiceImpl.java b/src/main/java/cn/com/tenlion/service/shopcertification/impl/ShopCertificationServiceImpl.java new file mode 100644 index 0000000..af3046e --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/shopcertification/impl/ShopCertificationServiceImpl.java @@ -0,0 +1,179 @@ +package cn.com.tenlion.service.shopcertification.impl; + +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.exceptions.ParamsException; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.map.HashMapUtil; +import ink.wgink.util.UUIDUtil; +import cn.com.tenlion.dao.shopcertification.IShopCertificationDao; +import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO; +import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO; +import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO; +import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO; +import cn.com.tenlion.service.shopcertification.IShopCertificationService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: ShopCertificationServiceImpl + * @Description: 店铺认证 + * @Author: CodeFactory + * @Date: 2021-04-07 17:47:38 + * @Version: 3.0 + **/ +@Service +public class ShopCertificationServiceImpl extends DefaultBaseService implements IShopCertificationService { + + @Autowired + private IShopCertificationDao shopCertificationDao; + + @Override + public void save(ShopCertificationVO shopCertificationVO) { + saveReturnId(shopCertificationVO); + } + + @Override + public void save(String token, ShopCertificationVO shopCertificationVO) { + saveReturnId(token, shopCertificationVO); + } + + @Override + public String saveReturnId(ShopCertificationVO shopCertificationVO) { + return saveReturnId(null, shopCertificationVO); + } + + @Override + public String saveReturnId(String token, ShopCertificationVO shopCertificationVO) { + Map params1 = new HashMap(); + params1.put("shopId",shopCertificationVO.getShopId()); + ShopCertificationDTO sdtot = shopCertificationDao.getByShopIdAndAuditStatus(params1); + if(sdtot != null){ + throw new ParamsException("该店铺已经提交过认证,请勿重复提交"); + } + String shopCertificationId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(shopCertificationVO); + params.put("shopCertificationId", shopCertificationId); + params.put("auditStatus", 0); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + shopCertificationDao.save(params); + return shopCertificationId; + } + + @Override + public void remove(List ids) { + remove(null, ids); + } + + @Override + public void remove(String token, List ids) { + Map params = getHashMap(2); + params.put("shopCertificationIds", ids); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + shopCertificationDao.remove(params); + } + + @Override + public void delete(List ids) { + Map params = getHashMap(2); + params.put("shopCertificationIds", ids); + shopCertificationDao.delete(params); + } + + @Override + public void update(String shopCertificationId, ShopCertificationVO shopCertificationVO) { + update(null, shopCertificationId, shopCertificationVO); + } + + @Override + public void update(String token, String shopCertificationId, ShopCertificationVO shopCertificationVO) { + Map params = HashMapUtil.beanToMap(shopCertificationVO); + params.put("shopCertificationId", shopCertificationId); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + shopCertificationDao.update(params); + } + + @Override + public ShopCertificationDTO get(Map params) { + return shopCertificationDao.get(params); + } + + @Override + public ShopCertificationDTO get(String shopCertificationId) { + Map params = super.getHashMap(2); + params.put("shopCertificationId", shopCertificationId); + return get(params); + } + + @Override + public ShopCertificationBO getBO(Map params) { + return shopCertificationDao.getBO(params); + } + + @Override + public ShopCertificationBO getBO(String shopCertificationId) { + Map params = super.getHashMap(2); + params.put("shopCertificationId", shopCertificationId); + return getBO(params); + } + + @Override + public ShopCertificationPO getPO(Map params) { + return shopCertificationDao.getPO(params); + } + + @Override + public ShopCertificationPO getPO(String shopCertificationId) { + Map params = super.getHashMap(2); + params.put("shopCertificationId", shopCertificationId); + return getPO(params); + } + + @Override + public List list(Map params) { + return shopCertificationDao.list(params); + } + + @Override + public List listBO(Map params) { + return shopCertificationDao.listBO(params); + } + + @Override + public List listPO(Map params) { + return shopCertificationDao.listPO(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List shopCertificationDTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(shopCertificationDTOs); + return new SuccessResultList<>(shopCertificationDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public Integer count(Map params) { + Integer count = shopCertificationDao.count(params); + return count == null ? 0 : count; + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/shopmember/impl/ShopMemberServiceImpl.java b/src/main/java/cn/com/tenlion/service/shopmember/impl/ShopMemberServiceImpl.java index 1f106f6..63c1ef7 100644 --- a/src/main/java/cn/com/tenlion/service/shopmember/impl/ShopMemberServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/shopmember/impl/ShopMemberServiceImpl.java @@ -1,6 +1,7 @@ package cn.com.tenlion.service.shopmember.impl; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.exceptions.SaveException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.dtos.user.UserDTO; import ink.wgink.pojo.result.SuccessResult; @@ -44,6 +45,13 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe @Override public void save(String token, ShopMemberVO shopMemberVO) { + Map params = new HashMap<>(); + params.put("userId",shopMemberVO.getUserId()); + params.put("shopId",shopMemberVO.getShopId()); + ShopMemberDTO sdto = shopMemberDao.getByUserIdAndShopId(params); + if(sdto != null){ + throw new SaveException("您已经是该店铺的会员"); + } saveReturnId(token, shopMemberVO); } @@ -57,6 +65,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe String shopMemberId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(shopMemberVO); params.put("memberId", shopMemberId); + params.put("memberLevel",1); if (StringUtils.isBlank(token)) { setSaveInfo(params); } else { diff --git a/src/main/java/cn/com/tenlion/service/shopstaff/impl/ShopStaffServiceImpl.java b/src/main/java/cn/com/tenlion/service/shopstaff/impl/ShopStaffServiceImpl.java index d355fa0..bf67b0d 100644 --- a/src/main/java/cn/com/tenlion/service/shopstaff/impl/ShopStaffServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/shopstaff/impl/ShopStaffServiceImpl.java @@ -3,6 +3,7 @@ package cn.com.tenlion.service.shopstaff.impl; import cn.com.tenlion.pojo.dtos.shopposition.ShopPositionDTO; import cn.com.tenlion.service.shopposition.IShopPositionService; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.exceptions.SaveException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.dtos.user.UserDTO; import ink.wgink.pojo.result.SuccessResult; @@ -49,6 +50,13 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta @Override public void save(String token, ShopStaffVO shopStaffVO) { + Map params = new HashMap<>(); + params.put("userId",shopStaffVO.getUserId()); + params.put("shopId",shopStaffVO.getShopId()); + ShopStaffDTO sdto = shopStaffDao.getByUserIdAndShopId(params); + if(sdto != null){ + throw new SaveException("您已是该店铺的员工"); + } saveReturnId(token, shopStaffVO); } @@ -62,7 +70,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta String shopStaffId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(shopStaffVO); params.put("shopStaffId", shopStaffId); - params.put("auditResult", "1"); + params.put("auditStatus", 1);//默认审核通过 if (StringUtils.isBlank(token)) { setSaveInfo(params); } else { diff --git a/src/main/java/cn/com/tenlion/util/QRCodeUtil.java b/src/main/java/cn/com/tenlion/util/QRCodeUtil.java index 3f029da..69a748c 100644 --- a/src/main/java/cn/com/tenlion/util/QRCodeUtil.java +++ b/src/main/java/cn/com/tenlion/util/QRCodeUtil.java @@ -59,6 +59,7 @@ public class QRCodeUtil { iFileStaticService = iFileService; } + private static BufferedImage createImage(String content, String imgPath, boolean needCompress) throws Exception { Hashtable hints = new Hashtable(); hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); @@ -69,8 +70,8 @@ public class QRCodeUtil { int height = bitMatrix.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); for (int x = 0; x < width; x++) { - for (int y = 0; y < height; y++) { - image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + for (int y = 0; y < height; y++) {// 0xFF0000FF + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); } } if (imgPath == null || "".equals(imgPath)) { @@ -256,22 +257,23 @@ public class QRCodeUtil { // 生成 String fileName = QRCodeUtil.encode(content, null, filePath.toString(), false); // 保存 - Map params = new HashMap(); - File qrCodeFile = new File(filePath.toString() + fileName); + File qrCodeFile = new File(filePath.toString() +"\\"+ fileName); FileVO fileVO = new FileVO(); fileVO.setFileName(fileName); - fileVO.setFileFullPath(filePath.toString() + fileName); - fileVO.setFileUrl(null); + fileVO.setFileUrl("files\\"+filePath.substring(filePath.indexOf("images"), filePath.length())+"\\"+ fileName); + fileVO.setFilePath(filePath.toString() +"\\"+ fileName); fileVO.setFileType("jpg"); fileVO.setFileSize(qrCodeFile.length()); - iFileStaticService.saveFileByUserId(userId, fileVO); - return params.get("fileId").toString(); + return iFileStaticService.saveFileByUserId(userId,fileVO); } public static void main(String[] args) throws Exception { - String text = "http://www.baidu.com"; //这里设置自定义网站url - String logoPath = "D:\\2020\\10\\10"; - //String destPath = "C:\\Users\\admin\\Desktop\\test\\"; - QRCodeUtil.encode(text, logoPath); +// String text = "http://www.baidu.com"; //这里设置自定义网站url +// String logoPath = "D:\\2020\\10\\10"; +// //String destPath = "C:\\Users\\admin\\Desktop\\test\\"; +// QRCodeUtil.encode(text, logoPath); + + + } } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/shopauditlog/shopauditlog-mapper.xml b/src/main/resources/mybatis/mapper/shopauditlog/shopauditlog-mapper.xml index 2efba32..cd6f9d2 100644 --- a/src/main/resources/mybatis/mapper/shopauditlog/shopauditlog-mapper.xml +++ b/src/main/resources/mybatis/mapper/shopauditlog/shopauditlog-mapper.xml @@ -5,6 +5,7 @@ + @@ -13,6 +14,7 @@ + @@ -21,6 +23,7 @@ + @@ -30,12 +33,14 @@ INSERT INTO svc_shop_audit_log( shop_id, audit_user, + audit_user_name, audit_status, audit_result, audit_date ) VALUES( #{shopId}, #{auditUser}, + #{auditUserName}, #{auditStatus}, #{auditResult}, #{auditDate} @@ -75,10 +80,11 @@ SELECT t1.shop_id, t1.audit_user, + t1.audit_user_name, t1.audit_status, t1.audit_result, - t1.audit_date, - 1 + t1.audit_date + FROM svc_shop_audit_log t1 WHERE diff --git a/src/main/resources/mybatis/mapper/shopcertification/shop-certification-mapper.xml b/src/main/resources/mybatis/mapper/shopcertification/shop-certification-mapper.xml new file mode 100644 index 0000000..b708e38 --- /dev/null +++ b/src/main/resources/mybatis/mapper/shopcertification/shop-certification-mapper.xml @@ -0,0 +1,481 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO svc_shop_certification( + shop_certification_id, + shop_id, + certification_id, + certification_number, + certification_name, + certification_type, + certification_address, + certification_legal_person, + certification_capital, + certification_found_time, + certification_license_term, + certification_business, + certification_authority, + certification_composition, + certification_image, + audit_status, + gmt_create, + creator, + gmt_modified, + modifier, + is_delete + ) VALUES( + #{shopCertificationId}, + #{shopId}, + #{certificationId}, + #{certificationNumber}, + #{certificationName}, + #{certificationType}, + #{certificationAddress}, + #{certificationLegalPerson}, + #{certificationCapital}, + #{certificationFoundTime}, + #{certificationLicenseTerm}, + #{certificationBusiness}, + #{certificationAuthority}, + #{certificationComposition}, + #{certificationImage}, + #{auditStatus}, + #{gmtCreate}, + #{creator}, + #{gmtModified}, + #{modifier}, + #{isDelete} + ) + + + + + UPDATE + svc_shop_certification + SET + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + is_delete = 1 + WHERE + shop_certification_id IN + + #{shopCertificationIds[${index}]} + + + + + + DELETE FROM + svc_shop_certification + WHERE + shop_certification_id IN + + #{shopCertificationIds[${index}]} + + + + + + UPDATE + svc_shop_certification + SET + + certification_id = #{certificationId}, + + + shop_id = #{shopId}, + + + certification_number = #{certificationNumber}, + + + certification_name = #{certificationName}, + + + certification_type = #{certificationType}, + + + certification_address = #{certificationAddress}, + + + certification_legal_person = #{certificationLegalPerson}, + + + certification_capital = #{certificationCapital}, + + + certification_found_time = #{certificationFoundTime}, + + + certification_license_term = #{certificationLicenseTerm}, + + + certification_business = #{certificationBusiness}, + + + certification_authority = #{certificationAuthority}, + + + certification_composition = #{certificationComposition}, + + + certification_image = #{certificationImage}, + + + audit_status = #{auditStatus}, + + gmt_modified = #{gmtModified}, + modifier = #{modifier} + WHERE + shop_certification_id = #{shopCertificationId} + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/shopmember/shopmember-mapper.xml b/src/main/resources/mybatis/mapper/shopmember/shopmember-mapper.xml index 319d427..d6019bd 100644 --- a/src/main/resources/mybatis/mapper/shopmember/shopmember-mapper.xml +++ b/src/main/resources/mybatis/mapper/shopmember/shopmember-mapper.xml @@ -267,4 +267,21 @@ t1.is_delete = 0 + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/shopstaff/shopstaff-mapper.xml b/src/main/resources/mybatis/mapper/shopstaff/shopstaff-mapper.xml index 4a404a2..98bafa4 100644 --- a/src/main/resources/mybatis/mapper/shopstaff/shopstaff-mapper.xml +++ b/src/main/resources/mybatis/mapper/shopstaff/shopstaff-mapper.xml @@ -11,6 +11,7 @@ + @@ -25,6 +26,7 @@ + @@ -40,6 +42,7 @@ + @@ -56,6 +59,7 @@ is_leader, is_admin, audit_status, + audit_result, gmt_create, creator, gmt_modified, @@ -69,6 +73,7 @@ #{isLeader}, #{isAdmin}, #{auditStatus}, + #{auditResult}, #{gmtCreate}, #{creator}, #{gmtModified}, @@ -85,7 +90,7 @@ modifier = #{modifier}, is_delete = 1 WHERE - staffIds IN + staff_id IN #{staffIds[${index}]} @@ -95,7 +100,7 @@ DELETE FROM svc_shop_staff WHERE - staffIds IN + staff_id IN #{staffIds[${index}]} @@ -148,12 +153,13 @@ t1.is_leader, t1.is_admin, t1.audit_status, + t1.audit_result, t1.gmt_create FROM svc_shop_staff t1 WHERE t1.is_delete = 0 - AND staff_id = #{staffId} + AND t1.staff_id = #{staffId} + + + \ No newline at end of file diff --git a/src/main/resources/static/route/shop/list.html b/src/main/resources/static/route/shop/list.html index 1956bd6..0359b5d 100644 --- a/src/main/resources/static/route/shop/list.html +++ b/src/main/resources/static/route/shop/list.html @@ -32,15 +32,7 @@
- @@ -83,7 +75,6 @@ [ {type:'checkbox', fixed: 'left'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field:'cz', width:220, title: '操作', align:'center', toolbar: '#barDemo', fixed: 'right'}, {field: 'shopLogo', width: 180, title: '店铺LOGO', align:'center', templet: function(row) { var rowData = row[this.field]; @@ -154,6 +145,17 @@ } return rowData; } + }, + {field:'cz', width:220, title: '操作', align:'center', fixed: 'right', + templet: function(row) { + var rowData = '
' + + '' + + '' + + '' + + '' + + '
'; + return rowData; + } } ] ], diff --git a/src/main/resources/static/route/shop/show.html b/src/main/resources/static/route/shop/show.html index f7ee4c8..fde0bd2 100644 --- a/src/main/resources/static/route/shop/show.html +++ b/src/main/resources/static/route/shop/show.html @@ -24,9 +24,13 @@
-
- - +
+
+ + + + +
@@ -35,12 +39,7 @@
-
- -
- -
-
+
@@ -61,6 +60,12 @@
+
+ +
+ +
+