| @@ -46,6 +46,11 @@ | |||
| <version>0.0.9</version> | |||
| </dependency> | |||
| <dependency> | |||
| <groupId>org.flywaydb</groupId> | |||
| <artifactId>flyway-core</artifactId> | |||
| </dependency> | |||
| </dependencies> | |||
| <build> | |||
| @@ -0,0 +1,10 @@ | |||
| package com.iformall.annotation; | |||
| import java.lang.annotation.*; | |||
| @Target({ElementType.PARAMETER, ElementType.METHOD}) | |||
| @Retention(RetentionPolicy.RUNTIME) | |||
| @Documented | |||
| public @interface SystemControllerLog { | |||
| String description() default ""; | |||
| } | |||
| @@ -0,0 +1,10 @@ | |||
| package com.iformall.annotation; | |||
| import java.lang.annotation.*; | |||
| @Target({ElementType.PARAMETER, ElementType.METHOD}) | |||
| @Retention(RetentionPolicy.RUNTIME) | |||
| @Documented | |||
| public @interface SystemServiceLog { | |||
| String description() default ""; | |||
| } | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.service.DataTowerService; | |||
| import io.swagger.annotations.Api; | |||
| @@ -26,6 +27,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询运营") | |||
| @GetMapping("/queryRunningPotal") | |||
| @SystemControllerLog(description = "数据塔台-查询运营") | |||
| public ResultData queryRunningPotal() { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryRunningPotal"); | |||
| @@ -36,6 +38,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询运营") | |||
| @GetMapping("/queryRunningMobile") | |||
| @SystemControllerLog(description = "数据塔台-查询运营") | |||
| public ResultData queryRunningMobile() { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryRunningMobile"); | |||
| @@ -47,6 +50,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询运营") | |||
| @GetMapping("/queryRunning") | |||
| @SystemControllerLog(description = "数据塔台-查询运营") | |||
| public ResultData queryRunning() { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryRunning"); | |||
| @@ -58,6 +62,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询车流") | |||
| @GetMapping("/queryCar") | |||
| @SystemControllerLog(description = "数据塔台-查询车流") | |||
| public ResultData queryCar() { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryCar"); | |||
| @@ -68,6 +73,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询客流") | |||
| @GetMapping("/queryCustomer") | |||
| @SystemControllerLog(description = "数据塔台-查询客流") | |||
| public ResultData queryCustomer() { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryCustomer"); | |||
| @@ -78,6 +84,7 @@ public class DataTowerController extends BaseController { | |||
| @ApiOperation("查询客流") | |||
| @GetMapping("/queryCustomerData") | |||
| @SystemControllerLog(description = "数据塔台-查询客流") | |||
| public ResultData queryCustomerData(@RequestParam Map<String,String> params) { | |||
| logger.debug("[" + getIpAddr() + "] DataTowerController::queryCustomer"); | |||
| @@ -9,6 +9,7 @@ import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.MallUserInfoVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.mq.MqBaseProducer; | |||
| import com.iformall.service.*; | |||
| import com.iformall.shiro.UserSession; | |||
| @@ -39,6 +40,7 @@ import javax.servlet.http.HttpServletResponse; | |||
| import java.awt.image.BufferedImage; | |||
| import java.io.IOException; | |||
| import java.net.URLEncoder; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| @@ -67,24 +69,7 @@ public class HomeController extends BaseController { | |||
| private WxMsgValidationcodeService wxMsgValidationcodeService; | |||
| @Autowired | |||
| private MqBaseProducer mqBaseProducer; | |||
| // @ApiOperation("发送邮件") | |||
| // @GetMapping("test") | |||
| // public ResultData test() throws Exception { | |||
| // String msg = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><meta name=\"viewport\" content=\"initial-scale=1.0, user-scalable=no\" /><meta name=\"renderer\" content=\"webkit\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\"><title>富茂审批邮件</title><title></title><script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';</script></head>\n" + | |||
| // "<body><div id=\"box\"><header style=\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\"><img style=\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\" src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/changrong-logo.png\"/>\n" + | |||
| // "</header><content><div style=\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 56px;margin-left: 55px;\">审批通过通知</div><div style=\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;margin-top: 36px;\">编号<span>123231232323</span>的合同已经审批通过,请登录,<a href=\"http://mall.youlane.cn\">长融后台</a>跟进后续工作</div></content></div></body></html>"; | |||
| // MailMsg mailMsg = new MailMsg(); | |||
| // mailMsg.setHtml(true); | |||
| // mailMsg.setFrom("luozukai1988@126.com"); | |||
| // mailMsg.setTo(new String[]{"luozukai@iformall.com"}); | |||
| // mailMsg.setSubject("富茂测试邮件"); | |||
| // mailMsg.setMsgType(EnumMsgRecordType.EMAIL.getCode()); | |||
| // mailMsg.setMsg(msg); | |||
| // mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); | |||
| // return new ResultData(); | |||
| // } | |||
| private MallUserActionService mallUserActionService; | |||
| @GetMapping("/captcha.jpg") | |||
| public void captcha(HttpServletResponse response)throws ServletException, IOException { | |||
| @@ -107,7 +92,8 @@ public class HomeController extends BaseController { | |||
| @ApiOperation("登录") | |||
| @PostMapping("/doLogin") | |||
| public ResultData login(@RequestBody MallUserInfo user, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] HomeController::login"); | |||
| String ipaddress = getIpAddr(); | |||
| logger.debug("[" + ipaddress + "] HomeController::doLogin"); | |||
| try { | |||
| String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY); | |||
| if(!user.getCaptcha().equalsIgnoreCase(kaptcha)){ | |||
| @@ -170,6 +156,15 @@ public class HomeController extends BaseController { | |||
| unameCookie.setPath("/"); | |||
| unameCookie.setMaxAge(3600); | |||
| response.addCookie(unameCookie); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(info.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(info.getId()); | |||
| action.setActionDesc("用户登录"); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| } catch (Exception e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(Result.ERROR, e.getMessage()); | |||
| @@ -190,7 +185,8 @@ public class HomeController extends BaseController { | |||
| @ApiOperation("B端登录") | |||
| @PostMapping("/bHidLogin") | |||
| public ResultData bLogin(@RequestBody MallUserInfo user, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] HomeController::bHidLogin"); | |||
| String ipaddress = getIpAddr(); | |||
| logger.debug("[" + ipaddress + "] HomeController::bHidLogin"); | |||
| ResultData data = new ResultData(); | |||
| // tenantId is appId | |||
| if(StringUtils.isBlank(user.getTenantId())) { | |||
| @@ -242,6 +238,15 @@ public class HomeController extends BaseController { | |||
| unameCookie.setMaxAge(3600); | |||
| response.addCookie(unameCookie); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(info.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(info.getId()); | |||
| action.setActionDesc("用户登录"); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| data.data = info; | |||
| } catch (MallinkException e) { | |||
| logger.error(e.getMessage()); | |||
| @@ -288,7 +293,8 @@ public class HomeController extends BaseController { | |||
| @ApiOperation(value = "手机验证码登录", notes = "{\"phone\",\"string\",\"code\",\"string\"}") | |||
| @PostMapping("/doLoginByPhone") | |||
| public ResultData doLoginByPhone(@RequestBody Map<String, String> params, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] HomeController::doLoginByPhone"); | |||
| String ipaddress = getIpAddr(); | |||
| logger.debug("[" + ipaddress + "] HomeController::doLoginByPhone"); | |||
| // String phone,String code,String pwd | |||
| String phone = params.get("phone"); | |||
| String code = params.get("code"); | |||
| @@ -335,6 +341,15 @@ public class HomeController extends BaseController { | |||
| unameCookie.setMaxAge(3600); | |||
| response.addCookie(unameCookie); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(info.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(info.getId()); | |||
| action.setActionDesc("用户手机号登录"); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| return new ResultData(info); | |||
| } catch (MallinkException e) { | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| @@ -351,6 +366,7 @@ public class HomeController extends BaseController { | |||
| @ApiOperation("登出") | |||
| @GetMapping("/logout") | |||
| @SystemControllerLog(description = "用户登出") | |||
| public ResultData logout() { | |||
| logger.debug("[" + getIpAddr() + "] HomeController::logout"); | |||
| ResultData data = new ResultData(); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallPermission; | |||
| @@ -28,6 +29,7 @@ public class MallPermissionController extends BaseController { | |||
| @GetMapping("alllist") | |||
| @SystemControllerLog(description = "用户管理-权限") | |||
| public ResultData alllist(String ava) { | |||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::alllist"); | |||
| MallPermission record = new MallPermission(); | |||
| @@ -37,6 +39,7 @@ public class MallPermissionController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "用户管理-权限添加") | |||
| public ResultData createPermission(MallPermission mallPermission) { | |||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::createPermission"); | |||
| Assert.notNull(mallPermission.getName(), "用户名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class MallPermissionController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "用户管理-权限更新") | |||
| public ResultData updatePermission(MallPermission sysPermission) { | |||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::updatePermission"); | |||
| mallPermissionService.saveOrUpdate(sysPermission); | |||
| @@ -52,6 +56,7 @@ public class MallPermissionController extends BaseController { | |||
| } | |||
| @GetMapping("/del") | |||
| @SystemControllerLog(description = "用户管理-权限删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::delete"); | |||
| mallPermissionService.deleteById(id); | |||
| @@ -59,6 +64,7 @@ public class MallPermissionController extends BaseController { | |||
| } | |||
| @GetMapping("/findById") | |||
| @SystemControllerLog(description = "用户管理-权限查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::findById"); | |||
| mallPermissionService.getById(id); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -50,6 +51,7 @@ public class MallRoleController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "用户管理-rule列表") | |||
| public ResultData list(MallRole sysRole, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::list"); | |||
| String tenantId = getTenantId(); | |||
| @@ -74,6 +76,7 @@ public class MallRoleController extends BaseController { | |||
| @PostMapping("saveOrUpdate") | |||
| @SystemControllerLog(description = "用户管理-rule保存") | |||
| public ResultData saveOrUpdate(@RequestBody MallRole sysRole) { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::saveOrUpdate"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -100,6 +103,7 @@ public class MallRoleController extends BaseController { | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "用户管理-rule添加") | |||
| public ResultData add(MallRole sysRole) { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::add"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -113,6 +117,7 @@ public class MallRoleController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "用户管理-rule更新") | |||
| public ResultData update(MallRole sysRole) { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::update"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -129,6 +134,7 @@ public class MallRoleController extends BaseController { | |||
| @PostMapping("/del") | |||
| @SystemControllerLog(description = "用户管理-rule删除") | |||
| public ResultData delete(@RequestBody MallRole sysRole) { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::delete"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -68,6 +69,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "用户管理-列表") | |||
| public ResultData listAsPage(MallUserInfo userInfo, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::listAsPage"); | |||
| userInfo.setTenantId(getTenantId()); | |||
| @@ -96,6 +98,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiOperation(value = "用户详情接口", response = String.class) | |||
| @GetMapping("detail") | |||
| @SystemControllerLog(description = "用户管理-用户详情") | |||
| public ResultData detail(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::detail"); | |||
| final MallUserInfo user = userInfoService.getById(id); | |||
| @@ -110,6 +113,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiOperation(value = "创建用户接口", response = String.class) | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "用户管理-创建用户") | |||
| public ResultData createUser(@RequestBody MallUserInfo userInfo) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::createUser"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -141,6 +145,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiOperation(value = "修改用户接口", response = String.class) | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "用户管理-修改用户") | |||
| public ResultData updateUser(@RequestBody MallUserInfo userInfo) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::updateUser"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -208,6 +213,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiOperation(value = "删除用户接口", response = String.class) | |||
| @PostMapping("/del") | |||
| @SystemControllerLog(description = "用户管理-删除用户") | |||
| public ResultData deleteUser(@RequestBody MallUserInfo userInfo) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::deleteUser"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -229,6 +235,7 @@ public class MallUserInfoController extends BaseController { | |||
| */ | |||
| @ApiOperation(value = "起停用户接口") | |||
| @PostMapping("updateStatus") | |||
| @SystemControllerLog(description = "用户管理-起停用户") | |||
| public ResultData modifyStatus(@RequestBody MallUserInfo userInfo) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::modifyStatus"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -263,6 +270,7 @@ public class MallUserInfoController extends BaseController { | |||
| @GetMapping("hasButtonPermission") | |||
| @SystemControllerLog(description = "用户管理-用户权限检查") | |||
| public ResultData hasButtonPermission(String permissions) { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::hasButtonPermission"); | |||
| MallUserInfo info = getUser(); | |||
| @@ -284,6 +292,7 @@ public class MallUserInfoController extends BaseController { | |||
| } | |||
| @GetMapping("getUser") | |||
| @SystemControllerLog(description = "用户管理-用户信息") | |||
| public ResultData getUserInfo() { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::getUserInfo"); | |||
| MallUserInfo info = getUser(); | |||
| @@ -396,6 +405,7 @@ public class MallUserInfoController extends BaseController { | |||
| @ApiOperation(value = "审批权限用户列表", response = String.class) | |||
| @GetMapping("getFlowPermissionList") | |||
| @SystemControllerLog(description = "用户管理-审批权限用户列表") | |||
| public ResultData getFlowPermissionList() { | |||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::getFlowPermissionList"); | |||
| MallUserInfo mallUserInfo = new MallUserInfo(); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.MarkingCouponDataReportDto; | |||
| import com.iformall.service.MarkingDataReportService; | |||
| @@ -29,6 +30,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询券数据") | |||
| @GetMapping("/couponData") | |||
| @SystemControllerLog(description = "券数据-查询券数据") | |||
| public ResultData findCouponData() { | |||
| logger.debug("[" + getIpAddr() + "] MarkingDataReportController::findCouponData"); | |||
| return new ResultData(markingDataReportService.getCouponData(getTenantId())); | |||
| @@ -36,6 +38,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询券数据列表") | |||
| @GetMapping("/couponDataList") | |||
| @SystemControllerLog(description = "券数据-查询券数据列表") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @@ -46,6 +49,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询场景投放券数据") | |||
| @GetMapping("/sceneData") | |||
| @SystemControllerLog(description = "券数据-查询场景投放券数据") | |||
| public ResultData findSceneData() { | |||
| logger.debug("[" + getIpAddr() + "] MarkingDataReportController::findSceneData"); | |||
| return new ResultData(markingDataReportService.getSceneData(getTenantId())); | |||
| @@ -53,6 +57,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询场景营销数据列表") | |||
| @GetMapping("/sceneDataList") | |||
| @SystemControllerLog(description = "券数据-查询场景营销数据列表") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @@ -63,6 +68,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询触达用户数数据") | |||
| @GetMapping("/touchUsersData") | |||
| @SystemControllerLog(description = "券数据-查询触达用户数数据") | |||
| public ResultData touchUsersData() { | |||
| logger.debug("[" + getIpAddr() + "] MarkingDataReportController::touchUsersData"); | |||
| return new ResultData(markingDataReportService.getTouchUsersReportData(getTenantId())); | |||
| @@ -70,6 +76,7 @@ public class MarkingDataReportController extends BaseController { | |||
| @ApiOperation("查询触达用户数数据列表") | |||
| @GetMapping("/touchUsersDataList") | |||
| @SystemControllerLog(description = "券数据-查询触达用户数数据列表") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.service.PushLimitService; | |||
| @@ -21,6 +22,7 @@ public class PushLimitController extends BaseController { | |||
| @ApiOperation("疲劳度配置") | |||
| @GetMapping("setting") | |||
| @SystemControllerLog(description = "疲劳度-配置获取") | |||
| public ResultData list() { | |||
| logger.debug("[" + getIpAddr() + "] PushLimitController::list"); | |||
| PushLimit pushLimit = pushLimitService.getPushLimit(getTenantId()); | |||
| @@ -29,6 +31,7 @@ public class PushLimitController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "疲劳度-配置更新") | |||
| public ResultData update(@RequestBody PushLimit pushLimit) { | |||
| logger.debug("[" + getIpAddr() + "] PushLimitController::update"); | |||
| pushLimit.setTenantId(getTenantId()); | |||
| @@ -4,10 +4,13 @@ import com.alibaba.fastjson.JSON; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserAction; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.vo.MallUserInfoVo; | |||
| import com.iformall.enums.EnumMallUserAction; | |||
| import com.iformall.enums.EnumUserAdmin; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.MallUserActionService; | |||
| import com.iformall.service.MallUserInfoService; | |||
| import com.iformall.service.MallUserRoleService; | |||
| import com.iformall.shiro.UserSession; | |||
| @@ -45,10 +48,7 @@ import javax.servlet.http.HttpServletResponse; | |||
| import java.io.IOException; | |||
| import java.io.UnsupportedEncodingException; | |||
| import java.net.URLEncoder; | |||
| import java.util.ArrayList; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.*; | |||
| import java.util.concurrent.TimeUnit; | |||
| @@ -67,6 +67,9 @@ public class WechatLoginController extends BaseController { | |||
| @Autowired | |||
| private MallUserRoleService mallUserRoleService; | |||
| @Autowired | |||
| private MallUserActionService mallUserActionService; | |||
| @Autowired | |||
| @Qualifier("openRedisTemplate") | |||
| RedisTemplate<String, String> openRedisTemplate; | |||
| @@ -95,7 +98,8 @@ public class WechatLoginController extends BaseController { | |||
| @ApiOperation(value = "微信网页登录回调", notes = "请配置此callback到网页redirect_uri") | |||
| @GetMapping("callback") | |||
| public void getAccessToken(String code, String state, HttpServletRequest request, HttpServletResponse response) { | |||
| log.debug("[" + getIpAddr() + "] WechatLoginController::getAccessToken"); | |||
| String ipaddress = getIpAddr(); | |||
| log.debug("[" + ipaddress + "] WechatLoginController::getAccessToken"); | |||
| String host = request.getHeader("host"); | |||
| log.debug("host: " + host); | |||
| log.debug("code: " + code); | |||
| @@ -156,6 +160,15 @@ public class WechatLoginController extends BaseController { | |||
| unameCookie.setPath("/"); | |||
| unameCookie.setMaxAge(3600); | |||
| response.addCookie(unameCookie); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(info.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(info.getId()); | |||
| action.setActionDesc("用户微信登录"); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| } catch (Exception e) { | |||
| log.error(e.getMessage()); | |||
| ret.put("code", Result.ERROR); | |||
| @@ -246,7 +259,8 @@ public class WechatLoginController extends BaseController { | |||
| @ApiImplicitParam(name = "key", value = "key", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "userName", value = "userName", dataType = "String", paramType = "query", required = true)}) | |||
| public ResultData weChatUserLogin(String key, String userName, HttpServletRequest request, HttpServletResponse response) { | |||
| log.debug("[" + getIpAddr() + "] MallUserInfoController::weChatUserLogin"); | |||
| String ipaddress = getIpAddr(); | |||
| log.debug("[" + ipaddress + "] MallUserInfoController::weChatUserLogin"); | |||
| String host = request.getHeader("host"); | |||
| log.debug("Host: " + host); | |||
| if(StringUtils.isBlank(userName)) { | |||
| @@ -286,6 +300,15 @@ public class WechatLoginController extends BaseController { | |||
| unameCookie.setMaxAge(3600); | |||
| response.addCookie(unameCookie); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(info.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(info.getId()); | |||
| action.setActionDesc("用户微信登录"); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| return new ResultData(); | |||
| } catch (UnknownAccountException e) { | |||
| log.error(e.getMessage()); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.vo.WxBillAll; | |||
| import com.iformall.service.WxBillAllService; | |||
| @@ -22,29 +23,30 @@ import java.util.Map; | |||
| */ | |||
| @RestController | |||
| @RequestMapping("wxBillAll") | |||
| public class WxBillAllController extends BaseController | |||
| { | |||
| @Autowired | |||
| public class WxBillAllController extends BaseController { | |||
| @Autowired | |||
| private WxBillAllService wxBillAllService; | |||
| private Logger logger = LoggerFactory.getLogger(WxBillAllController.class); | |||
| @GetMapping("oweBillCount") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="contractId",value="合同id",dataType="long", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="type",value="类型1租赁合同2物业合同",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData oweBillCount(Long contractId,Integer type) { | |||
| Long count = wxBillAllService.hasOweBill(contractId,type); | |||
| @ApiImplicitParam(name = "contractId", value = "合同id", dataType = "long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "type", value = "类型1租赁合同2物业合同", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "账单总览-总额") | |||
| public ResultData oweBillCount(Long contractId, Integer type) { | |||
| Long count = wxBillAllService.hasOweBill(contractId, type); | |||
| return new ResultData(count); | |||
| } | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "账单总览-列表") | |||
| public ResultData list(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillAllController::list"); | |||
| if (null == wxBillAll){ | |||
| if (null == wxBillAll) { | |||
| wxBillAll = new WxBillAll(); | |||
| } | |||
| wxBillAll.setTenantId(getTenantId()); | |||
| @@ -53,12 +55,14 @@ public class WxBillAllController extends BaseController | |||
| } | |||
| @GetMapping("exportBill") | |||
| public void exportBill(@ModelAttribute WxBillAll wxBillAll,HttpServletRequest request, HttpServletResponse response){ | |||
| @SystemControllerLog(description = "账单总览-导出") | |||
| public void exportBill(@ModelAttribute WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillAll.setTenantId(getTenantId()); | |||
| wxBillAllService.exportBill(request,response,wxBillAll); | |||
| wxBillAllService.exportBill(request, response, wxBillAll); | |||
| } | |||
| @GetMapping("getBillInfo") | |||
| @SystemControllerLog(description = "账单总览-获取账单信息") | |||
| public ResultData getBillInfo(@ModelAttribute WxBillAll wxBillAll) { | |||
| wxBillAll.setTenantId(getTenantId()); | |||
| Object billInfo = wxBillAllService.getBillInfo(wxBillAll); | |||
| @@ -66,5 +70,4 @@ public class WxBillAllController extends BaseController | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillDaily; | |||
| @@ -19,28 +20,29 @@ import java.util.Map; | |||
| */ | |||
| @RestController | |||
| @RequestMapping("wxBillDaily") | |||
| public class WxBillDailyController extends BaseController | |||
| { | |||
| @Autowired | |||
| public class WxBillDailyController extends BaseController { | |||
| @Autowired | |||
| private WxBillDailyService wxBillDailyService; | |||
| private Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxBillDaily wxBillDaily,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "日常账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillDaily wxBillDaily, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::list"); | |||
| if (null == wxBillDaily) { | |||
| wxBillDaily = new WxBillDaily(); | |||
| } | |||
| if (null == wxBillDaily) { | |||
| wxBillDaily = new WxBillDaily(); | |||
| } | |||
| wxBillDaily.setTenantId(getTenantId()); | |||
| final PageInfo<Map<String,Object>> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||
| final PageInfo<Map<String, Object>> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "日常账单-新增") | |||
| public ResultData add(@RequestBody WxBillDaily wxBillDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::add"); | |||
| wxBillDaily.setTenantId(getTenantId()); | |||
| @@ -49,6 +51,7 @@ public class WxBillDailyController extends BaseController | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "日常账单-更新") | |||
| public ResultData update(@RequestBody WxBillDaily wxBillDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::update"); | |||
| wxBillDaily.setUserId(getUser().getId()); | |||
| @@ -56,26 +59,29 @@ public class WxBillDailyController extends BaseController | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "日常账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::delete"); | |||
| wxBillDailyService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "日常账单-id查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBillDailyService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDailyService.getById(id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "日常账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::updatePaid"); | |||
| return wxBillDailyService.updatePaid(id); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillDeposit; | |||
| @@ -29,6 +30,7 @@ public class WxBillDepositController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金-列表") | |||
| public ResultData list(@ModelAttribute WxBillDeposit wxBillDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::list"); | |||
| if (null == wxBillDeposit) { | |||
| @@ -40,6 +42,7 @@ public class WxBillDepositController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁押金-新增") | |||
| public ResultData add(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::add"); | |||
| wxBillDeposit.setTenantId(getTenantId()); | |||
| @@ -48,6 +51,7 @@ public class WxBillDepositController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁押金-更新") | |||
| public ResultData update(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::update"); | |||
| return wxBillDepositService.saveOrUpdate(wxBillDeposit); | |||
| @@ -56,6 +60,7 @@ public class WxBillDepositController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::delete"); | |||
| wxBillDepositService.deleteById(id); | |||
| @@ -64,6 +69,7 @@ public class WxBillDepositController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDepositService.getById(id)); | |||
| @@ -71,12 +77,14 @@ public class WxBillDepositController extends BaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::updatePaid"); | |||
| return wxBillDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "租赁押金-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::returnDeposit"); | |||
| return wxBillDepositService.returnDeposit(wxBillDeposit); | |||
| @@ -84,6 +92,7 @@ public class WxBillDepositController extends BaseController { | |||
| } | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "租赁押金-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::adjustDeposit"); | |||
| return wxBillDepositService.adjustDeposit(wxBillDeposit); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillOther; | |||
| @@ -19,28 +20,29 @@ import java.util.Map; | |||
| */ | |||
| @RestController | |||
| @RequestMapping("wxBillOther") | |||
| public class WxBillOtherController extends BaseController | |||
| { | |||
| @Autowired | |||
| public class WxBillOtherController extends BaseController { | |||
| @Autowired | |||
| private WxBillOtherService wxBillOtherService; | |||
| private Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxBillOther wxBillOther,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "其它账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillOther wxBillOther, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::list"); | |||
| if (null == wxBillOther) { | |||
| wxBillOther = new WxBillOther(); | |||
| } | |||
| if (null == wxBillOther) { | |||
| wxBillOther = new WxBillOther(); | |||
| } | |||
| wxBillOther.setTenantId(getTenantId()); | |||
| final PageInfo<Map<String,Object>> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||
| final PageInfo<Map<String, Object>> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "其它账单-新增") | |||
| public ResultData add(@RequestBody WxBillOther wxBillOther) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::add"); | |||
| wxBillOther.setTenantId(getTenantId()); | |||
| @@ -49,6 +51,7 @@ public class WxBillOtherController extends BaseController | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "其它账单-更新") | |||
| public ResultData update(@RequestBody WxBillOther wxBillOther) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::update"); | |||
| wxBillOther.setUserId(getUser().getId()); | |||
| @@ -56,26 +59,29 @@ public class WxBillOtherController extends BaseController | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::delete"); | |||
| wxBillOtherService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBillOtherService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherService.getById(id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::updatePaid"); | |||
| return wxBillOtherService.updatePaid(id); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||
| @@ -29,6 +30,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "其它押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillOtherDeposit wxBillOtherDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::list"); | |||
| if (null == wxBillOtherDeposit) { | |||
| @@ -40,6 +42,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "其它账单-新增") | |||
| public ResultData add(@RequestBody WxBillOtherDeposit wxBillOtherDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::add"); | |||
| wxBillOtherDeposit.setTenantId(getTenantId()); | |||
| @@ -48,6 +51,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "其它账单-更新") | |||
| public ResultData update(@RequestBody WxBillOtherDeposit wxBillOtherDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::update"); | |||
| wxBillOtherDeposit.setUserId(getUser().getId()); | |||
| @@ -56,6 +60,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::delete"); | |||
| wxBillOtherDepositService.deleteById(id); | |||
| @@ -64,6 +69,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherDepositService.getById(id)); | |||
| @@ -71,12 +77,14 @@ public class WxBillOtherDepositController extends BaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::updatePaid"); | |||
| return wxBillOtherDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "其它账单-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::returnDeposit"); | |||
| return wxBillOtherDepositService.returnDeposit(wxBillDeposit); | |||
| @@ -84,6 +92,7 @@ public class WxBillOtherDepositController extends BaseController { | |||
| } | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "其它账单-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::adjustDeposit"); | |||
| return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillProperty; | |||
| @@ -29,6 +30,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "物业账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillProperty wxBillProperty, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::list"); | |||
| if (null == wxBillProperty) { | |||
| @@ -41,6 +43,7 @@ public class WxBillPropertyController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "物业账单-新增") | |||
| public ResultData add(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::add"); | |||
| wxBillProperty.setTenantId(getTenantId()); | |||
| @@ -49,6 +52,7 @@ public class WxBillPropertyController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "物业账单-更新") | |||
| public ResultData update(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::update"); | |||
| wxBillPropertyService.saveOrUpdate(wxBillProperty); | |||
| @@ -57,6 +61,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::delete"); | |||
| wxBillPropertyService.deleteById(id); | |||
| @@ -65,6 +70,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyService.getById(id)); | |||
| @@ -72,6 +78,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::updatePaid"); | |||
| return wxBillPropertyService.updatePaid(id); | |||
| @@ -79,6 +86,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @GetMapping("/detail") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-详情") | |||
| public ResultData detail(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::detail"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyService.detail(id)); | |||
| @@ -89,6 +97,7 @@ public class WxBillPropertyController extends BaseController { | |||
| @ApiImplicitParam(name = "propertyContractId", value = "merchantId", dataType = "Long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "物业账单-根据商户获取") | |||
| public ResultData findByPropertyContractId(Long propertyContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findByPropertyContractId"); | |||
| final PageInfo<Map<String, Object>> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantId(), pageNum, pageSize); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||
| @@ -20,21 +21,21 @@ import java.util.Map; | |||
| */ | |||
| @RestController | |||
| @RequestMapping("wxBillPropertyDeposit") | |||
| public class WxBillPropertyDepositController extends BaseController | |||
| { | |||
| @Autowired | |||
| public class WxBillPropertyDepositController extends BaseController { | |||
| @Autowired | |||
| private WxBillPropertyDepositService wxBillPropertyDepositService; | |||
| private Logger logger = LoggerFactory.getLogger(WxBillPropertyDepositController.class); | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "物业押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillPropertyDeposit wxBillPropertyDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::list"); | |||
| if (null == wxBillPropertyDeposit) { | |||
| wxBillPropertyDeposit = new WxBillPropertyDeposit(); | |||
| if (null == wxBillPropertyDeposit) { | |||
| wxBillPropertyDeposit = new WxBillPropertyDeposit(); | |||
| } | |||
| wxBillPropertyDeposit.setTenantId(getTenantId()); | |||
| PageInfo<Map<String, Object>> result = wxBillPropertyDepositService.listAsPage(wxBillPropertyDeposit, pageNum, pageSize); | |||
| @@ -42,6 +43,7 @@ public class WxBillPropertyDepositController extends BaseController | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "物业押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::add"); | |||
| wxBillPropertyDeposit.setTenantId(getTenantId()); | |||
| @@ -50,34 +52,39 @@ public class WxBillPropertyDepositController extends BaseController | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "物业押金账单-更新") | |||
| public ResultData update(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::update"); | |||
| return wxBillPropertyDepositService.saveOrUpdate(wxBillPropertyDeposit); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::delete"); | |||
| wxBillPropertyDepositService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-id查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBillPropertyDepositService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.getById(id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::updatePaid"); | |||
| return wxBillPropertyDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "物业押金账单-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::returnDeposit"); | |||
| return wxBillPropertyDepositService.returnDeposit(wxBillPropertyDeposit); | |||
| @@ -86,6 +93,7 @@ public class WxBillPropertyDepositController extends BaseController | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "物业押金账单-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::adjustDeposit"); | |||
| return wxBillPropertyDepositService.adjustDeposit(wxBillPropertyDeposit); | |||
| @@ -93,5 +101,4 @@ public class WxBillPropertyDepositController extends BaseController | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| @@ -29,6 +30,7 @@ public class WxBillRentController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillRent wxBillRent, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::list"); | |||
| if (null == wxBillRent) { | |||
| @@ -41,6 +43,7 @@ public class WxBillRentController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::add"); | |||
| wxBillRent.setTenantId(getTenantId()); | |||
| @@ -48,6 +51,7 @@ public class WxBillRentController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁押金账单-更新") | |||
| public ResultData update(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::update"); | |||
| return wxBillRentService.saveOrUpdate(wxBillRent); | |||
| @@ -55,6 +59,7 @@ public class WxBillRentController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::delete"); | |||
| wxBillRentService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxBillRentController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-id查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillRentService.getById(id)); | |||
| @@ -73,6 +79,7 @@ public class WxBillRentController extends BaseController { | |||
| @ApiImplicitParam(name = "rentContractId", value = "merchantId", dataType = "Long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金账单-根据商户获取") | |||
| public ResultData findByRentContractId(Long rentContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | |||
| final PageInfo<Map<String, Object>> page = wxBillRentService.findByRentContractId(rentContractId, getTenantId(), pageNum, pageSize); | |||
| @@ -81,6 +88,7 @@ public class WxBillRentController extends BaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updatePaid"); | |||
| return wxBillRentService.updatePaid(id); | |||
| @@ -88,6 +96,7 @@ public class WxBillRentController extends BaseController { | |||
| @GetMapping("/detail") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-详情") | |||
| public ResultData detail(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::detail"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillRentService.detail(id)); | |||
| @@ -95,6 +104,7 @@ public class WxBillRentController extends BaseController { | |||
| @PostMapping("updateRevenue") | |||
| @SystemControllerLog(description = "租赁押金账单-更新营业额") | |||
| public ResultData updateRevenue(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateRevenue"); | |||
| return wxBillRentService.updateRevenue(wxBillRent); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBrand; | |||
| @@ -34,6 +35,7 @@ public class WxBrandController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "品牌-列表") | |||
| public ResultData list(@ModelAttribute WxBrand wxBrand, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBrandController::list"); | |||
| if (null == wxBrand) { | |||
| @@ -45,6 +47,7 @@ public class WxBrandController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "品牌-增加") | |||
| public ResultData add(@RequestBody WxBrand wxBrand) { | |||
| logger.debug("[" + getIpAddr() + "] WxBrandController::add"); | |||
| wxBrand.setTenantId(getTenantId()); | |||
| @@ -52,6 +55,7 @@ public class WxBrandController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "品牌-更新") | |||
| public ResultData update(@RequestBody WxBrand wxBrand) { | |||
| logger.debug("[" + getIpAddr() + "] WxBrandController::update"); | |||
| wxBrand.setTenantId(getTenantId()); | |||
| @@ -60,6 +64,7 @@ public class WxBrandController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "品牌-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBrandController::del"); | |||
| wxBrandService.deleteById(id); | |||
| @@ -68,11 +73,13 @@ public class WxBrandController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "品牌-查找") | |||
| public ResultData findById(Long id) { | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBrandService.getById(id)); | |||
| } | |||
| @GetMapping("/queryBrand") | |||
| @SystemControllerLog(description = "品牌-租户-全部") | |||
| public ResultData queryBrand() { | |||
| List<Map<String,Object>> brandList = wxBrandService.queryBrand(getTenantId()); | |||
| return new ResultData(brandList); | |||
| @@ -84,6 +91,7 @@ public class WxBrandController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "name", value = "name", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query")}) | |||
| @SystemControllerLog(description = "品牌-名称是否存在") | |||
| public ResultData hasBrand(String name, Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBrandController::hasBrand"); | |||
| return wxBrandService.hasBrand(getTenantId(), name, id); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBusiness; | |||
| @@ -31,6 +32,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "业态-列表") | |||
| public ResultData list(@ModelAttribute WxBusiness wxBusiness, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::list"); | |||
| if (null == wxBusiness) wxBusiness = new WxBusiness(); | |||
| @@ -40,6 +42,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("成长值业态列表接口") | |||
| @GetMapping("busListForScore") | |||
| @SystemControllerLog(description = "成长值-业态-列表") | |||
| public ResultData getList() { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::getList"); | |||
| WxBusiness wxBusiness = new WxBusiness(); | |||
| @@ -51,6 +54,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("业态全列表接口") | |||
| @GetMapping("allist") | |||
| @SystemControllerLog(description = "业态-全列表") | |||
| public ResultData getAllList() { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::getList"); | |||
| WxBusiness wxBusiness = new WxBusiness(); | |||
| @@ -60,6 +64,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "业态-新增") | |||
| public ResultData add(@RequestBody WxBusiness wxBusiness) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::add"); | |||
| //Assert.notNull(wxBusiness.getName(), "角色名不能为空"); | |||
| @@ -69,6 +74,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "业态-更新") | |||
| public ResultData update(@RequestBody WxBusiness wxBusiness) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::update"); | |||
| return new ResultData(); | |||
| @@ -77,6 +83,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "业态-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::delete"); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| @@ -85,6 +92,7 @@ public class WxBusinessController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "业态-查询") | |||
| public ResultData findById(Integer id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBusinessService.getById(id)); | |||
| @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -119,6 +120,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "会员管理-列表") | |||
| public ResultData list(@ModelAttribute WxCUserBasicInfo wxCUserBasicInfo, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::list"); | |||
| if (null == wxCUserBasicInfo) { | |||
| @@ -154,6 +156,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "会员管理-更新") | |||
| public ResultData update(@RequestBody WxCUserBasicInfo wxCUserBasicInfo) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::update"); | |||
| MallUserInfo currentUser = getUser(); | |||
| @@ -190,6 +193,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "会员管理-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::delete"); | |||
| wxCUserBasicInfoService.deleteById(id); | |||
| @@ -199,6 +203,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "会员管理-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::findById"); | |||
| WxCUserBasicInfo info = wxCUserBasicInfoService.getById(id); | |||
| @@ -215,6 +220,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("根据userId查询交易记录接口") | |||
| @GetMapping("/findOrderCouponByUserId") | |||
| @ApiImplicitParam(name = "userId", value = "userId", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "会员管理-userId查询交易记录") | |||
| public ResultData findOrderCouponByUserId(Long userId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::findOrderCouponByUserId"); | |||
| WxCouponOrder corder = new WxCouponOrder(); | |||
| @@ -235,6 +241,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("会员记录导出总数") | |||
| @GetMapping("/exportDataCount") | |||
| @SystemControllerLog(description = "会员管理-会员记录导出总数") | |||
| public ResultData exportDataCount(@ModelAttribute WxCUserBasicInfo basicInfo) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::exportDataCount"); | |||
| if(basicInfo == null) { | |||
| @@ -257,6 +264,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiOperation("会员记录导出") | |||
| @GetMapping("/exportData") | |||
| @SystemControllerLog(description = "会员管理-会员记录导出") | |||
| public void exportData(@ModelAttribute WxCUserBasicInfo basicInfo, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::exportData"); | |||
| if(basicInfo == null) { | |||
| @@ -276,6 +284,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| } | |||
| @RequestMapping("/exportTemplate") | |||
| @SystemControllerLog(description = "会员管理-导出模板") | |||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::exportTemplate"); | |||
| @@ -294,6 +303,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| } | |||
| @PostMapping(value = "/importTemplate", consumes = "multipart/*") | |||
| @SystemControllerLog(description = "会员管理-导入数据") | |||
| public ResultData importTemplate(@RequestParam("file") MultipartFile mFile) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::importTemplate"); | |||
| if (mFile.isEmpty()) { | |||
| @@ -378,6 +388,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @GetMapping("/queryTemplateCount") | |||
| @SystemControllerLog(description = "会员管理-导入数据查询") | |||
| public ResultData queryTemplateCount() { | |||
| String importKey = Constant.importMemPrev + getUser().getId(); | |||
| Map entries = stringRedisTemplate.opsForHash().entries(importKey); | |||
| @@ -421,6 +432,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiImplicitParam(name = "endDate", value = "结束时间", dataType = "string", paramType = "query"), | |||
| @ApiImplicitParam(name = "isPay", value = "是否缴费 1是", dataType = "int", paramType = "query") | |||
| }) | |||
| @SystemControllerLog(description = "会员管理-进出场车辆分页列表") | |||
| public ResultData carPayList(@ModelAttribute WxCarPayRecord record, Integer pageNum, Integer pageSize){ | |||
| record.setTenantId(super.getTenantId()); | |||
| return new ResultData(wxCarPayRecordService.findCarPayListByPage(record,pageNum,pageSize)); | |||
| @@ -433,6 +445,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| @ApiImplicitParam(name = "endDate", value = "结束时间", dataType = "string", paramType = "query"), | |||
| @ApiImplicitParam(name = "isPay", value = "是否缴费 1是", dataType = "int", paramType = "query") | |||
| }) | |||
| @SystemControllerLog(description = "会员管理-停车会员记录导出") | |||
| public void exportCarPayData(@ModelAttribute WxCarPayRecord record,HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicInfoController::exportData"); | |||
| record.setTenantId(getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserCar; | |||
| @@ -26,6 +27,7 @@ public class WxCUserCarController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "停车-列表") | |||
| public ResultData list(@ModelAttribute WxCUserCar wxCUserCar, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserCarController::list"); | |||
| if (null == wxCUserCar) wxCUserCar = new WxCUserCar(); | |||
| @@ -35,6 +37,7 @@ public class WxCUserCarController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "停车-新增") | |||
| public ResultData add(@RequestBody WxCUserCar wxCUserCar) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserCarController::add"); | |||
| //Assert.notNull(wxCUserCar.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxCUserCarController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "停车-更新") | |||
| public ResultData update(@RequestBody WxCUserCar wxCUserCar) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserCarController::update"); | |||
| wxCUserCarService.saveOrUpdate(wxCUserCar); | |||
| @@ -54,6 +58,7 @@ public class WxCUserCarController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "停车-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserCarController::delete"); | |||
| wxCUserCarService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxCUserCarController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "停车-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserCarController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCUserCarService.getById(id)); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -20,23 +21,25 @@ import io.swagger.annotations.ApiOperation; | |||
| public class WxCUserController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxCUserService wxCUserService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxCUser wxCUser,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "用户管理-列表") | |||
| public ResultData list(@ModelAttribute WxCUser wxCUser, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::list"); | |||
| if (null == wxCUser) wxCUser = new WxCUser(); | |||
| if (null == wxCUser) wxCUser = new WxCUser(); | |||
| final PageInfo<WxCUser> page = wxCUserService.listAsPage(wxCUser, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "用户管理-新增") | |||
| public ResultData add(@RequestBody WxCUser wxCUser) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::add"); | |||
| //Assert.notNull(wxCUser.getName(), "角色名不能为空"); | |||
| @@ -47,6 +50,7 @@ public class WxCUserController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "用户管理-更新") | |||
| public ResultData update(@RequestBody WxCUser wxCUser) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::update"); | |||
| wxCUserService.saveOrUpdate(wxCUser); | |||
| @@ -55,21 +59,22 @@ public class WxCUserController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "用户管理-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::delete"); | |||
| wxCUserService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "用户管理-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserService.getById(id)); | |||
| logger.debug("[" + getIpAddr() + "] WxCUserController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCUserService.getById(id)); | |||
| } | |||
| } | |||
| @@ -10,6 +10,7 @@ import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -44,6 +45,7 @@ public class WxCUserDataController extends BaseController { | |||
| @GetMapping("findUserCountData") | |||
| @ApiOperation("查询用户数量接口") | |||
| @SystemControllerLog(description = "会员首页-报表数据-查询用户数量接口") | |||
| public ResultData findUserCountData() { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserDataController::findUserCountData"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -119,6 +121,7 @@ public class WxCUserDataController extends BaseController { | |||
| @ApiOperation("查询用户活跃量") | |||
| @GetMapping("findUserVisitData") | |||
| @SystemControllerLog(description = "会员首页-报表数据-查询用户活跃量") | |||
| public ResultData findUserVisitData() { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserDataController::findUserVisitData"); | |||
| HashMap<String, Object> params = new HashMap<>(); | |||
| @@ -208,6 +211,7 @@ public class WxCUserDataController extends BaseController { | |||
| @ApiOperation("查询用户消费金额") | |||
| @GetMapping("findUserAmountData") | |||
| @SystemControllerLog(description = "会员首页-报表数据-查询用户消费金额") | |||
| private ResultData findUserAmountData() { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserDataController::findUserAmountData"); | |||
| String tenantId = getTenantId(); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserTags; | |||
| @@ -26,6 +27,7 @@ public class WxCUserTagsController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "会员首页-标签-列表") | |||
| public ResultData list(@ModelAttribute WxCUserTags wxCUserTags, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserTagsController::list"); | |||
| if (null == wxCUserTags) wxCUserTags = new WxCUserTags(); | |||
| @@ -35,6 +37,7 @@ public class WxCUserTagsController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "会员首页-标签-新增") | |||
| public ResultData add(@RequestBody WxCUserTags wxCUserTags) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserTagsController::add"); | |||
| //Assert.notNull(wxCUserTags.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxCUserTagsController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "会员首页-标签-更新") | |||
| public ResultData update(@RequestBody WxCUserTags wxCUserTags) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserTagsController::update"); | |||
| wxCUserTagsService.saveOrUpdate(wxCUserTags); | |||
| @@ -54,6 +58,7 @@ public class WxCUserTagsController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "会员首页-标签-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserTagsController::delete"); | |||
| wxCUserTagsService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxCUserTagsController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "会员首页-标签-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserTagsController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCUserTagsService.getById(id)); | |||
| @@ -3,6 +3,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -50,6 +51,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "宣传页-列表") | |||
| public ResultData list(@ModelAttribute WxCampaign wxCampaign, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::list"); | |||
| if (null == wxCampaign) wxCampaign = new WxCampaign(); | |||
| @@ -64,6 +66,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "宣传页-新增") | |||
| public ResultData add(@RequestBody WxCampaign wxCampaign) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::add"); | |||
| if (StringUtils.isNotBlank(wxCampaign.getCouponIds())) { | |||
| @@ -80,6 +83,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "宣传页-id更新") | |||
| public ResultData update(@RequestBody WxCampaign wxCampaign) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::update"); | |||
| @@ -94,6 +98,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("updateStatus") | |||
| @SystemControllerLog(description = "宣传页-更新状态") | |||
| public ResultData updateStatus(@RequestBody WxCampaign wxCampaign) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::updateStatus"); | |||
| WxCampaign campaign = wxCampaignService.getById(wxCampaign.getId()); | |||
| @@ -125,6 +130,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "宣传页-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::delete"); | |||
| wxCampaignService.deleteById(id); | |||
| @@ -134,6 +140,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "宣传页-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::findById"); | |||
| WxCampaign wxCampaign = wxCampaignService.getById(id); | |||
| @@ -154,6 +161,7 @@ public class WxCampaignController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "sourceId", value = "", dataType = "Long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "targetId", value = "", dataType = "Long", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "宣传页-调整顺序") | |||
| public ResultData move(Long sourceId, Long targetId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCampaignController::move"); | |||
| WxCampaign source = wxCampaignService.getById(sourceId); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCarCmdLog; | |||
| @@ -26,6 +27,7 @@ public class WxCarCmdLogController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "车流-列表") | |||
| public ResultData list(@ModelAttribute WxCarCmdLog wxCarCmdLogs, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarCmdLogController::list"); | |||
| if (null == wxCarCmdLogs) wxCarCmdLogs = new WxCarCmdLog(); | |||
| @@ -35,6 +37,7 @@ public class WxCarCmdLogController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "车流-新增") | |||
| public ResultData add(@RequestBody WxCarCmdLog wxCarCmdLog) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarCmdLogController::add"); | |||
| //Assert.notNull(wxCarCmdLogs.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxCarCmdLogController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "车流-更新") | |||
| public ResultData update(@RequestBody WxCarCmdLog wxCarCmdLog) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarCmdLogController::update"); | |||
| wxCarCmdLogService.saveOrUpdate(wxCarCmdLog); | |||
| @@ -54,6 +58,7 @@ public class WxCarCmdLogController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "车流-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarCmdLogController::delete"); | |||
| wxCarCmdLogService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxCarCmdLogController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "车流-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarCmdLogController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCarCmdLogService.getById(id)); | |||
| @@ -3,6 +3,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| @@ -64,6 +65,7 @@ public class WxCarController extends BaseController { | |||
| @ApiOperation(value = "获取车场支持的厂家", notes = "{}") | |||
| @GetMapping("/getVendor") | |||
| @SystemControllerLog(description = "车-获取车场支持的厂家") | |||
| public ResultData getVendor() { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::getVendor"); | |||
| MallUserInfo user = getUser(); | |||
| @@ -118,6 +120,7 @@ public class WxCarController extends BaseController { | |||
| @ApiImplicitParam(name = "merchantId", value = "商户ID", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "车-优免券模板") | |||
| public ResultData quanTemplate(String merchantId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::quanTemplate"); | |||
| MallUserInfo user = getUser(); | |||
| @@ -178,6 +181,7 @@ public class WxCarController extends BaseController { | |||
| @ApiOperation("新增停车券接口") | |||
| @PostMapping("save") | |||
| @SystemControllerLog(description = "车-新增停车券接口") | |||
| public ResultData save(@RequestBody WxCouponCarVo coupon) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::save"); | |||
| logger.info(coupon.toString()); | |||
| @@ -237,6 +241,7 @@ public class WxCarController extends BaseController { | |||
| @GetMapping("/templateAmtCount") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "templateId", value = "模板ID", dataType = "Long", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "车-优免券模板已分配总数") | |||
| public ResultData getTemplateAmountSum(Long templateId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::getTemplateAmountSum"); | |||
| Map map = new HashMap(); | |||
| @@ -254,6 +259,7 @@ public class WxCarController extends BaseController { | |||
| @GetMapping("/templateAvaiCount") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "templateId", value = "模板ID", dataType = "Long", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "车-优免券模板库存总数") | |||
| public ResultData getTemplateAvailSum(Long templateId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::getTemplateAvailSum"); | |||
| Map map = new HashMap(); | |||
| @@ -269,6 +275,7 @@ public class WxCarController extends BaseController { | |||
| @ApiOperation("停车券detail") | |||
| @GetMapping("/detail") | |||
| @SystemControllerLog(description = "车-停车券detail") | |||
| public ResultData getCouponCarDetail(@RequestParam Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCarController::getCouponCarDetail"); | |||
| return new ResultData(wxCouponCarService.findDetailVo(id)); | |||
| @@ -276,6 +283,7 @@ public class WxCarController extends BaseController { | |||
| @ApiOperation(value = "停车场状态") | |||
| @GetMapping("/getParkStatus") | |||
| @SystemControllerLog(description = "车-停车场状态") | |||
| public ResultData getParkStatus() { | |||
| MallUserInfo user = getUser(); | |||
| /// 1, get mall's park | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| @@ -56,6 +57,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "储值卡支付-售卡记录列表") | |||
| public ResultData cardOrderList(@ModelAttribute WxCardVo wxCardVo, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("cardPay/cardOrderList: " + ipStr); | |||
| @@ -86,6 +88,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "储值卡支付-储值卡交易流水") | |||
| public ResultData cardSpendlist(@ModelAttribute WxCardSpendVo wxCardSpendVo, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("cardPay/cardSpendlist: " + ipStr); | |||
| @@ -110,6 +113,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiOperation("C端扫B端储值卡交易流水SUM") | |||
| @GetMapping("sum") | |||
| @SystemControllerLog(description = "储值卡支付-储值卡交易流水SUM") | |||
| public ResultData sumCardSpendList(@ModelAttribute WxCardSpendVo wxCardSpend) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("cardPay/sumCardSpendList: " + ipStr + " :" + wxCardSpend.toString()); | |||
| @@ -124,6 +128,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiOperation("交易流水导出") | |||
| @GetMapping("/exportData") | |||
| @SystemControllerLog(description = "储值卡支付-储值卡交易流水导出") | |||
| public void exportData(@ModelAttribute WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.info("[" + getIpAddr() + "] cardPay/exportData"); | |||
| if (wxCardSpendVo == null) { | |||
| @@ -145,6 +150,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiOperation("更新卡消费支付状态") | |||
| @PostMapping("/updatePayStatus") | |||
| @SystemControllerLog(description = "储值卡支付-更新卡消费支付状态") | |||
| public ResultData update(@RequestBody WxCardSpend wxCardSpend) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("cardPay/updatePayStatus: " + ipStr + " :" + wxCardSpend.toString()); | |||
| @@ -159,6 +165,7 @@ public class WxCardPayController extends BaseController { | |||
| @ApiOperation("卡完结") | |||
| @PostMapping("/finishCard") | |||
| @SystemControllerLog(description = "储值卡支付-卡完结") | |||
| public ResultData finishCard(@RequestBody WxCardInfo wxCardInfo) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("cardPay/finishCard: " + ipStr + " :" + wxCardInfo.toString()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxChannel; | |||
| @@ -26,6 +27,7 @@ public class WxChannelController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "渠道-列表") | |||
| public ResultData list(@ModelAttribute WxChannel wxChannel, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxChannelController::list"); | |||
| if (null == wxChannel) wxChannel = new WxChannel(); | |||
| @@ -35,6 +37,7 @@ public class WxChannelController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "渠道-新增") | |||
| public ResultData add(@RequestBody WxChannel wxChannel) { | |||
| logger.debug("[" + getIpAddr() + "] WxChannelController::add"); | |||
| //Assert.notNull(wxChannel.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxChannelController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "渠道-更新") | |||
| public ResultData update(@RequestBody WxChannel wxChannel) { | |||
| logger.debug("[" + getIpAddr() + "] WxChannelController::update"); | |||
| wxChannelService.saveOrUpdate(wxChannel); | |||
| @@ -54,6 +58,7 @@ public class WxChannelController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "渠道-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxChannelController::delete"); | |||
| wxChannelService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxChannelController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "渠道-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxChannelController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxChannelService.getById(id)); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.service.WxChartDataService; | |||
| import io.swagger.annotations.Api; | |||
| @@ -33,6 +34,7 @@ public class WxChartDataController extends BaseController { | |||
| @ApiImplicitParam(name = "startdate", value = "startdate", dataType = "String", paramType = "query"), | |||
| @ApiImplicitParam(name = "enddate", value = "enddate", dataType = "String", paramType = "query") | |||
| }) | |||
| @SystemControllerLog(description = "报表-图表") | |||
| public ResultData queryData(@RequestParam Map<String, String> params) { | |||
| logger.debug("[" + getIpAddr() + "] WxChartDataController::queryData"); | |||
| params.put("tenantId",super.getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponActionLog; | |||
| @@ -26,6 +27,7 @@ public class WxCouponActionLogController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "注券记录-图表") | |||
| public ResultData list(@ModelAttribute WxCouponActionLog wxCouponActionLog, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponActionLogController::list"); | |||
| if (null == wxCouponActionLog) wxCouponActionLog = new WxCouponActionLog(); | |||
| @@ -35,6 +37,7 @@ public class WxCouponActionLogController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "注券记录-新增") | |||
| public ResultData add(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponActionLogController::add"); | |||
| //Assert.notNull(wxCouponActionLog.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxCouponActionLogController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "注券记录-更新") | |||
| public ResultData update(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponActionLogController::update"); | |||
| wxCouponActionLogService.saveOrUpdate(wxCouponActionLog); | |||
| @@ -54,6 +58,7 @@ public class WxCouponActionLogController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "注券记录-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponActionLogController::delete"); | |||
| wxCouponActionLogService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxCouponActionLogController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "注券记录-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponActionLogController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCouponActionLogService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponCar; | |||
| @@ -26,6 +27,7 @@ public class WxCouponCarController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "停车券-列表") | |||
| public ResultData list(@ModelAttribute WxCouponCar wxCouponCar, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::list"); | |||
| if (null == wxCouponCar) wxCouponCar = new WxCouponCar(); | |||
| @@ -35,6 +37,7 @@ public class WxCouponCarController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "停车券-新增") | |||
| public ResultData add(@RequestBody WxCouponCar wxCouponCar) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::add"); | |||
| //Assert.notNull(wxCouponCar.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxCouponCarController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "停车券-更新") | |||
| public ResultData update(@RequestBody WxCouponCar wxCouponCar) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::update"); | |||
| wxCouponCarService.update(wxCouponCar); | |||
| @@ -54,6 +58,7 @@ public class WxCouponCarController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "停车券-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::delete"); | |||
| wxCouponCarService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxCouponCarController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "停车券-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCouponCarService.getById(id)); | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -45,6 +46,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券投放-列表") | |||
| public ResultData list(@ModelAttribute WxCouponChannel wxCouponChannel, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::list"); | |||
| if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); | |||
| @@ -60,6 +62,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "券投放-更新") | |||
| public ResultData update(@RequestBody WxCouponChannel wxCouponChannel) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::update"); | |||
| wxCouponChannel.setTenantId(getUser().getTenantId()); | |||
| @@ -70,6 +73,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::delete"); | |||
| wxCouponChannelService.deleteById(id); | |||
| @@ -79,6 +83,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCouponChannelService.getById(id)); | |||
| @@ -86,6 +91,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiOperation("批量新增") | |||
| @PostMapping("/addbatch") | |||
| @SystemControllerLog(description = "券投放-批量新增") | |||
| public ResultData addbatch(@RequestBody WxCouponChannelDto wxCouponChannelDto) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch"); | |||
| String[] ids = wxCouponChannelDto.getCouponIds().split(","); | |||
| @@ -97,6 +103,7 @@ public class WxCouponChannelController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findChannelByCouponId") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-查询") | |||
| public ResultData findChannelByCouponId(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::findChannelByCouponId"); | |||
| List<Integer> channellist = new ArrayList<>(); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| @@ -33,6 +34,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券投放-列表") | |||
| public ResultData list(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::list"); | |||
| if (wxCoupon == null) wxCoupon = new WxCoupon(); | |||
| @@ -42,6 +44,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "券投放-新增") | |||
| public ResultData add(@RequestBody WxCoupon wxCoupon) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | |||
| return wxCouponService.saveOrUpdate(wxCoupon); | |||
| @@ -49,6 +52,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "券投放-更新") | |||
| public ResultData update(@RequestBody WxCoupon wxCoupon) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::update"); | |||
| if (wxCoupon.getId() == null) { | |||
| @@ -61,6 +65,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::delete"); | |||
| wxCouponService.deleteById(id); | |||
| @@ -70,6 +75,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-查询") | |||
| public ResultData findById(@RequestParam Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::findById");; | |||
| return new ResultData(wxCouponService.getVoById(id)); | |||
| @@ -81,6 +87,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券投放-卡营销列表") | |||
| public ResultData findCardCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | |||
| //默认时间本月第一天,截止到当天 | |||
| Map<String,Object> result = new HashedMap(); | |||
| @@ -114,6 +121,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券投放-券营销列表") | |||
| public ResultData findCouponCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | |||
| //默认时间本月第一天,截止到当天 | |||
| Map<String,Object> result = new HashedMap(); | |||
| @@ -141,6 +149,7 @@ public class WxCouponController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券投放-砍价营销列表") | |||
| public ResultData findPressCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | |||
| //默认时间本月第一天,截止到当天 | |||
| Map<String,Object> result = new HashedMap(); | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponInject; | |||
| @@ -38,6 +39,7 @@ public class WxCouponInjectController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "精准投放-列表") | |||
| public ResultData list(@ModelAttribute WxCouponInject couponInject, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponInjectController::list"); | |||
| if (null == couponInject) couponInject = new WxCouponInject(); | |||
| @@ -52,6 +54,7 @@ public class WxCouponInjectController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "精准投放-新增") | |||
| public ResultData add(@RequestBody WxCouponInject couponInject) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponInjectController::add"); | |||
| @@ -63,6 +66,7 @@ public class WxCouponInjectController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "精准投放-更新") | |||
| public ResultData update(@RequestBody WxCouponInject couponInject) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponInjectController::update"); | |||
| String[] arys = couponInject.getTags().split(","); | |||
| @@ -78,6 +82,7 @@ public class WxCouponInjectController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "精准投放-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponInjectController::delete"); | |||
| wxCouponInjectService.deleteById(id); | |||
| @@ -87,6 +92,7 @@ public class WxCouponInjectController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "精准投放-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponInjectController::findById"); | |||
| WxCouponInject couponInject = wxCouponInjectService.getById(id); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| @@ -47,6 +48,7 @@ public class WxCouponOrderController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券包-列表") | |||
| public ResultData list(@ModelAttribute WxCouponOrderBVo wxCouponOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponOrderController::list"); | |||
| if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); | |||
| @@ -64,6 +66,7 @@ public class WxCouponOrderController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "couponOrderId", value = "券ID", dataType = "Long", paramType = "query", required = true) | |||
| }) | |||
| @SystemControllerLog(description = "券包-卡券详情") | |||
| public ResultData detail(@RequestParam("couponOrderId") Long couponOrderId) { | |||
| if(couponOrderId == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||
| @@ -72,6 +75,7 @@ public class WxCouponOrderController extends BaseController { | |||
| } | |||
| @RequestMapping("/exportData") | |||
| @SystemControllerLog(description = "券包-导出") | |||
| public void exportData( | |||
| @RequestParam("endDate") String endDate, | |||
| @RequestParam("startDate") String startDate, | |||
| @@ -113,6 +117,7 @@ public class WxCouponOrderController extends BaseController { | |||
| @ApiOperation(value = "退券退款", notes = "{\"couponOrderId\":\"string\"}") | |||
| @PostMapping("/refund") | |||
| @SystemControllerLog(description = "券包-退券退款") | |||
| public ResultData create(@RequestBody Map<String, String> paramMap) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponOrderController::create"); | |||
| //Assert.notNull(wxRefundOrder.getName(), "角色名不能为空"); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponSendConfig; | |||
| @@ -25,6 +26,7 @@ public class WxCouponSendConfigController extends BaseController { | |||
| @ApiOperation("获取开关") | |||
| @GetMapping("get") | |||
| @SystemControllerLog(description = "发券开关-获取") | |||
| public ResultData getCouponSendConfig(@ModelAttribute WxCouponSendConfig wxCouponSendConfig) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallConfigController::getCouponSendConfig"); | |||
| if (wxCouponSendConfig == null || wxCouponSendConfig.getSendType() == null) | |||
| @@ -41,6 +43,7 @@ public class WxCouponSendConfigController extends BaseController { | |||
| @PostMapping("update") | |||
| @ApiOperation("修改开关") | |||
| @SystemControllerLog(description = "发券开关-修改开关") | |||
| public ResultData updateCouponSendConfig(@RequestBody WxCouponSendConfig wxCouponSendConfig) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallConfigController::updateStopCarConpon"); | |||
| if (wxCouponSendConfig == null) | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -41,6 +42,7 @@ public class WxCouponSendController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "注券-列表") | |||
| public ResultData list(@ModelAttribute WxCouponSend wxCouponSend, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSendController::list"); | |||
| if (null == wxCouponSend) wxCouponSend = new WxCouponSend(); | |||
| @@ -57,6 +59,7 @@ public class WxCouponSendController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "注券-新增") | |||
| public ResultData add(@RequestBody WxCouponSend wxCouponSend) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSendController::add"); | |||
| if (null == wxCouponSend) { | |||
| @@ -83,6 +86,7 @@ public class WxCouponSendController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "注券-更新") | |||
| public ResultData update(@RequestBody WxCouponSend wxCouponSend) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSendController::update"); | |||
| wxCouponSend.setTenantId(getTenantId()); | |||
| @@ -93,6 +97,7 @@ public class WxCouponSendController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "注券-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSendController::delete"); | |||
| WxCouponSend wxCouponSend = wxCouponSendService.getById(id); | |||
| @@ -107,6 +112,7 @@ public class WxCouponSendController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "注券-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSendController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCouponSendService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponSpread; | |||
| @@ -30,6 +31,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "券推广-列表") | |||
| public ResultData list(@ModelAttribute WxCouponSpread wxCouponSpread, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::list"); | |||
| if (null == wxCouponSpread) wxCouponSpread = new WxCouponSpread(); | |||
| @@ -39,6 +41,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "券推广-新增") | |||
| public ResultData add(@RequestBody WxCouponSpread wxCouponSpread) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::add"); | |||
| if (wxCouponSpread.getCouponId() == null) { | |||
| @@ -52,6 +55,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "券推广-更新") | |||
| public ResultData update(@RequestBody WxCouponSpread wxCouponSpread) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::update"); | |||
| wxCouponSpreadService.saveOrUpdate(wxCouponSpread); | |||
| @@ -61,6 +65,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券推广-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::delete"); | |||
| wxCouponSpreadService.deleteById(id); | |||
| @@ -70,6 +75,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券推广-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCouponSpreadService.getById(id)); | |||
| @@ -78,6 +84,7 @@ public class WxCouponSpreadController extends BaseController { | |||
| @ApiOperation("根据卡券id查询接口") | |||
| @GetMapping("/findByCouponId") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券推广-卡券id查询") | |||
| public ResultData findByCouponId(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponSpreadController::findByCouponId"); | |||
| WxCouponSpread result = null; | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -34,6 +35,7 @@ public class WxDeviceController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "IOT设备-设备列表") | |||
| public Result list(@ModelAttribute WxDevice wxDevice, Integer pageNum, Integer pageSize) { | |||
| wxDevice.setTenantId(getTenantId()); | |||
| wxDevice.setStatus(EnumDeviceStatus.VALID.getCode()); | |||
| @@ -42,6 +44,7 @@ public class WxDeviceController extends BaseController { | |||
| @ApiOperation("添加设备") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "IOT设备-添加设备") | |||
| public Result add(@RequestBody WxDevice wxDevice) { | |||
| WxDevice record = new WxDevice(); | |||
| @@ -59,6 +62,7 @@ public class WxDeviceController extends BaseController { | |||
| @ApiOperation("更新设备") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "IOT设备-更新设备") | |||
| public Result update(@RequestBody WxDevice wxDevice) { | |||
| if (wxDevice == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -71,6 +75,7 @@ public class WxDeviceController extends BaseController { | |||
| @ApiOperation("设备详情") | |||
| @GetMapping("detail") | |||
| @SystemControllerLog(description = "IOT设备-设备详情") | |||
| public Result detail(@RequestParam Long id) { | |||
| if (id == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -83,6 +88,7 @@ public class WxDeviceController extends BaseController { | |||
| @ApiOperation("删除设备") | |||
| @PostMapping("delete") | |||
| @SystemControllerLog(description = "IOT设备-删除设备") | |||
| public Result delete(@RequestParam Long id) { | |||
| if (id == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.github.pagehelper.Page; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -65,6 +66,7 @@ public class WxDeviceScreenAdController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "广告屏-列表") | |||
| public Result list(@RequestParam String deviceId, Integer pageNum, Integer pageSize) { | |||
| WxDevice wxDevice = findDevice(deviceId); | |||
| @@ -106,6 +108,7 @@ public class WxDeviceScreenAdController extends BaseController { | |||
| @ApiOperation("基础信息") | |||
| @GetMapping("info") | |||
| @SystemControllerLog(description = "广告屏-基础信息") | |||
| public Result info(@RequestParam String deviceId) { | |||
| WxDevice wxDevice = findDevice(deviceId); | |||
| if (wxDevice == null) | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserTags; | |||
| import com.iformall.domain.po.WxFlowRecord; | |||
| @@ -33,6 +34,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiOperation(value = "启动流程",notes = "{\"businessId\":\"221178539888607232\",\"businessType\":1,\"remark\":\"意见意见。\",\"taskAssignee\":[{\"taskKey\":\"firstTaskUser\",\"assignee\":\"243650055783841792\"},{\"taskKey\":\"secondTaskUser\",\"assignee\":\"\"}],\"variables\":[{\"key\":\"contractType\",\"value\":\"1\"},{\"key\":\"contractNumber\",\"value\":\"1111\"}]}") | |||
| @PostMapping("/start") | |||
| @SystemControllerLog(description = "工作流-启动流程") | |||
| public ResultData start(@RequestBody Map<String, Object> params) { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::start"); | |||
| return wxFlowService.start(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); | |||
| @@ -61,6 +63,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "flowType", value = "流程类型,1合同流程 2账单流程", dataType = "string", paramType = "query", required = true) | |||
| }) | |||
| @SystemControllerLog(description = "工作流-用户代办列表") | |||
| public ResultData list(String flowType,Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::list"); | |||
| return wxFlowService.list(flowType,pageNum,pageSize,super.getUser().getId()); | |||
| @@ -75,6 +78,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "工作流-我的申请列表") | |||
| public ResultData myApplyList(@ModelAttribute WxFlowRecord record, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::myApplyList"); | |||
| record.setUserId(super.getUser().getId()); | |||
| @@ -91,6 +95,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "businessId", value = "业务id", dataType = "long", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "工作流-审批历史") | |||
| public ResultData applyHistory(Long businessId) { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistory"); | |||
| return wxFlowService.applyHistory(businessId,super.getTenantId()); | |||
| @@ -104,6 +109,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "businessId", value = "业务id", dataType = "long", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "工作流-审批历史和代办") | |||
| public ResultData applyHistoryAndAssignee(Long businessId) { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistoryAndAssignee"); | |||
| return wxFlowService.getTaskStatusList(businessId,super.getTenantId()); | |||
| @@ -123,6 +129,7 @@ public class WxFlowAbleController extends BaseController { | |||
| */ | |||
| @ApiOperation(value = "驳回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") | |||
| @PostMapping(value = "reject") | |||
| @SystemControllerLog(description = "工作流-驳回") | |||
| public ResultData reject(@RequestBody Map<String, Object> params) { | |||
| return wxFlowService.reject(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); | |||
| } | |||
| @@ -133,6 +140,7 @@ public class WxFlowAbleController extends BaseController { | |||
| */ | |||
| @ApiOperation(value = "撤回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") | |||
| @PostMapping(value = "setBack") | |||
| @SystemControllerLog(description = "工作流-撤回") | |||
| public ResultData setBack(@RequestBody Map<String, Object> params) { | |||
| return wxFlowService.setBack(params,super.getUser().getId(),super.getUser().getName()); | |||
| } | |||
| @@ -145,6 +153,7 @@ public class WxFlowAbleController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "businessId", value = "业务id", dataType = "String", paramType = "query", required = true) | |||
| }) | |||
| @SystemControllerLog(description = "工作流-生成流程图") | |||
| public void genProcessDiagram(HttpServletResponse httpServletResponse, String businessId) throws Exception { | |||
| wxFlowService.genProcessDiagram(httpServletResponse,businessId); | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxGame; | |||
| @@ -29,6 +30,7 @@ public class WxGameController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "游戏-列表") | |||
| public ResultData list(@ModelAttribute WxGame wxGame, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::list"); | |||
| if (null == wxGame) wxGame = new WxGame(); | |||
| @@ -40,6 +42,7 @@ public class WxGameController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "游戏-新增") | |||
| public ResultData add(@RequestBody WxGame wxGame) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::add"); | |||
| //Assert.notNull(wxGame.getName(), "角色名不能为空"); | |||
| @@ -55,6 +58,7 @@ public class WxGameController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "游戏-更新") | |||
| public ResultData update(@RequestBody WxGame wxGame) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::update"); | |||
| if (StringUtils.isBlank(wxGame.getCouponIds())) { | |||
| @@ -68,6 +72,7 @@ public class WxGameController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "游戏-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::delete"); | |||
| wxGameService.deleteById(id); | |||
| @@ -77,6 +82,7 @@ public class WxGameController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "游戏-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxGameService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxGameTemplate; | |||
| @@ -28,6 +29,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "游戏模板-分页列表") | |||
| public ResultData listPage(@ModelAttribute WxGameTemplate wxGameTemplate, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::listPage"); | |||
| if (null == wxGameTemplate) wxGameTemplate = new WxGameTemplate(); | |||
| @@ -37,6 +39,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiOperation("列表接口") | |||
| @GetMapping("list") | |||
| @SystemControllerLog(description = "游戏模板-列表") | |||
| public ResultData list(@ModelAttribute WxGameTemplate wxGameTemplate) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::list"); | |||
| if (null == wxGameTemplate) wxGameTemplate = new WxGameTemplate(); | |||
| @@ -46,6 +49,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "游戏模板-新增") | |||
| public ResultData add(@RequestBody WxGameTemplate wxGameTemplate) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::add"); | |||
| //Assert.notNull(wxGameTemplate.getName(), "角色名不能为空"); | |||
| @@ -56,6 +60,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "游戏模板-更新") | |||
| public ResultData update(@RequestBody WxGameTemplate wxGameTemplate) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::update"); | |||
| wxGameTemplateService.saveOrUpdate(wxGameTemplate); | |||
| @@ -65,6 +70,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "游戏模板-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::delete"); | |||
| wxGameTemplateService.deleteById(id); | |||
| @@ -74,6 +80,7 @@ public class WxGameTemplateController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "游戏模板-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGameTemplateController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxGameTemplateService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxGroup; | |||
| @@ -24,6 +25,7 @@ public class WxGroupController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "集团-列表") | |||
| public ResultData list(@ModelAttribute WxGroup wxGroup, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxGroupController::list"); | |||
| if (null == wxGroup) wxGroup = new WxGroup(); | |||
| @@ -32,6 +34,7 @@ public class WxGroupController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "集团-添加") | |||
| public ResultData add(@RequestBody WxGroup wxGroup) { | |||
| logger.debug("[" + getIpAddr() + "] WxGroupController::add"); | |||
| //Assert.notNull(wxGroup.getName(), "角色名不能为空"); | |||
| @@ -41,6 +44,7 @@ public class WxGroupController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "集团-更新") | |||
| public ResultData update(@RequestBody WxGroup wxGroup) { | |||
| logger.debug("[" + getIpAddr() + "] WxGroupController::update"); | |||
| wxGroupService.saveOrUpdate(wxGroup); | |||
| @@ -49,6 +53,7 @@ public class WxGroupController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "集团-删除") | |||
| public ResultData delete(String id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGroupController::delete"); | |||
| wxGroupService.deleteById(id); | |||
| @@ -57,6 +62,7 @@ public class WxGroupController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "集团-查询") | |||
| public ResultData findById(String id) { | |||
| logger.debug("[" + getIpAddr() + "] WxGroupController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxGroupService.getById(id)); | |||
| @@ -26,38 +26,38 @@ import java.util.List; | |||
| @RestController | |||
| @RequestMapping("wxLevelConfig") | |||
| @Api(description="等级权益相关接口") | |||
| @Api(description = "等级权益相关接口") | |||
| public class WxLevelConfigController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxLevelConfigService wxLevelConfigService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxLevelConfig wxLevelConfig,Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::list"); | |||
| if (null == wxLevelConfig) wxLevelConfig = new WxLevelConfig(); | |||
| wxLevelConfig.setTenantId(getTenantId()); | |||
| wxLevelConfig.setSortColumns(WxLevelConfig.Field.Points_ASC); | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxLevelConfig wxLevelConfig, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::list"); | |||
| if (null == wxLevelConfig) wxLevelConfig = new WxLevelConfig(); | |||
| wxLevelConfig.setTenantId(getTenantId()); | |||
| wxLevelConfig.setSortColumns(WxLevelConfig.Field.Points_ASC); | |||
| final PageInfo<WxLevelConfig> page = wxLevelConfigService.listAsPage(wxLevelConfig, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody List<WxLevelConfig> levelConfigs) { | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::add"); | |||
| String tenantId = getTenantId(); | |||
| try { | |||
| wxLevelConfigService.batchSave(tenantId, levelConfigs); | |||
| } catch (Exception e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(ErrorCode.DB_FAIL); | |||
| } | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::add"); | |||
| String tenantId = getTenantId(); | |||
| try { | |||
| wxLevelConfigService.batchSave(tenantId, levelConfigs); | |||
| } catch (Exception e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(ErrorCode.DB_FAIL); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @@ -82,13 +82,13 @@ public class WxLevelConfigController extends BaseController { | |||
| wxLevelConfigService.deleteById(wxLevelConfig.getId()); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxLevelConfigService.getById(id)); | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxLevelConfigService.getById(id)); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMallApply; | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMallBuilding; | |||
| @@ -18,23 +19,25 @@ import org.springframework.web.bind.annotation.*; | |||
| public class WxMallBuildingController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxMallBuildingService wxMallBuildingService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxMallBuilding wxMallBuilding,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商城-楼座-列表") | |||
| public ResultData list(@ModelAttribute WxMallBuilding wxMallBuilding, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::list"); | |||
| if (null == wxMallBuilding) wxMallBuilding = new WxMallBuilding(); | |||
| if (null == wxMallBuilding) wxMallBuilding = new WxMallBuilding(); | |||
| final PageInfo<WxMallBuilding> page = wxMallBuildingService.listAsPage(wxMallBuilding, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "商城-楼座-新增") | |||
| public ResultData add(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::add"); | |||
| //Assert.notNull(wxMallBuilding.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxMallBuildingController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "商城-楼座-更新") | |||
| public ResultData update(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::update"); | |||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||
| @@ -53,36 +57,39 @@ public class WxMallBuildingController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-楼座-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::delete"); | |||
| wxMallBuildingService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-楼座-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallBuildingService.getById(id)); | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMallBuildingService.getById(id)); | |||
| } | |||
| @ApiOperation("获取所有数据") | |||
| @GetMapping("getbuildinglist") | |||
| @SystemControllerLog(description = "商城-楼座-获取所有数据") | |||
| public ResultData getbuildinglist() { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::getbuildinglist"); | |||
| return wxMallBuildingService.getbuildinglist(getTenantId()); | |||
| return wxMallBuildingService.getbuildinglist(getTenantId()); | |||
| } | |||
| @ApiOperation("获取楼层楼座数据") | |||
| @GetMapping("getbuildingfloorlist") | |||
| @SystemControllerLog(description = "商城-楼座-获取楼层楼座数据") | |||
| public ResultData getbuildingfloorlist() { | |||
| logger.debug("[" + getIpAddr() + "] WxMallBuildingController::getbuildingfloorlist"); | |||
| return wxMallBuildingService.getbuildingfloorlist(getTenantId()); | |||
| return wxMallBuildingService.getbuildingfloorlist(getTenantId()); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMall; | |||
| @@ -26,6 +27,7 @@ public class WxMallController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商城") | |||
| public ResultData list(@ModelAttribute WxMall wxMall, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::list"); | |||
| if (null == wxMall) wxMall = new WxMall(); | |||
| @@ -35,6 +37,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "商城-新增") | |||
| public ResultData add(@RequestBody WxMall wxMall) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::add"); | |||
| //Assert.notNull(wxMall.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "商城-更新") | |||
| public ResultData update(@RequestBody WxMall wxMall) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::update"); | |||
| wxMallService.saveOrUpdate(wxMall); | |||
| @@ -54,6 +58,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::delete"); | |||
| wxMallService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMallService.getById(id)); | |||
| @@ -70,6 +76,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/mallinfoExt") | |||
| @SystemControllerLog(description = "商城-查询") | |||
| public ResultData mallinfoExt() { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::mallinfoExt"); | |||
| return new ResultData(wxMallService.getByTenantIdExt(getTenantId())); | |||
| @@ -77,6 +84,7 @@ public class WxMallController extends BaseController { | |||
| @ApiOperation("查询当前mall的信息") | |||
| @GetMapping("/mallinfo") | |||
| @SystemControllerLog(description = "商城-当前查询") | |||
| public ResultData mallinfo() { | |||
| logger.debug("[" + getIpAddr() + "] WxMallController::mallinfo"); | |||
| return new ResultData(wxMallService.getByTenantId(getTenantId())); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -20,23 +21,25 @@ import io.swagger.annotations.ApiOperation; | |||
| public class WxMallFloorController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxMallFloorService wxMallFloorService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxMallFloor wxMallFloor,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商城-楼层-列表") | |||
| public ResultData list(@ModelAttribute WxMallFloor wxMallFloor, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::list"); | |||
| if (null == wxMallFloor) wxMallFloor = new WxMallFloor(); | |||
| if (null == wxMallFloor) wxMallFloor = new WxMallFloor(); | |||
| final PageInfo<WxMallFloor> page = wxMallFloorService.listAsPage(wxMallFloor, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "商城-楼层-新增") | |||
| public ResultData add(@RequestBody WxMallFloor wxMallFloor) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::add"); | |||
| //Assert.notNull(wxMallFloor.getName(), "角色名不能为空"); | |||
| @@ -47,6 +50,7 @@ public class WxMallFloorController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "商城-楼层-更新") | |||
| public ResultData update(@RequestBody WxMallFloor wxMallFloor) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::update"); | |||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||
| @@ -55,28 +59,31 @@ public class WxMallFloorController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-楼层-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::delete"); | |||
| wxMallFloorService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商城-楼层-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallFloorService.getById(id)); | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMallFloorService.getById(id)); | |||
| } | |||
| @ApiOperation("获取所有数据") | |||
| @GetMapping("getfloorlist") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="buildingId",value="楼座ID",dataType="Long", paramType = "query",required=true)}) | |||
| public ResultData getfloorlist(Long buildingId){ | |||
| @ApiImplicitParam(name = "buildingId", value = "楼座ID", dataType = "Long", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商城-楼座-楼层") | |||
| public ResultData getfloorlist(Long buildingId) { | |||
| logger.debug("[" + getIpAddr() + "] WxMallFloorController::getfloorlist"); | |||
| return wxMallFloorService.getfloorlist(getTenantId(),buildingId); | |||
| return wxMallFloorService.getfloorlist(getTenantId(), buildingId); | |||
| } | |||
| @@ -18,22 +18,22 @@ import org.springframework.web.bind.annotation.*; | |||
| public class WxMerchantBUserController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxMerchantBUserService wxMerchantBUserService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxMerchantBUser wxMerchantBUser,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxMerchantBUser wxMerchantBUser, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::list"); | |||
| if (null == wxMerchantBUser) wxMerchantBUser = new WxMerchantBUser(); | |||
| if (null == wxMerchantBUser) wxMerchantBUser = new WxMerchantBUser(); | |||
| final PageInfo<WxMerchantBUser> page = wxMerchantBUserService.listAsPage(wxMerchantBUser, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchantBUser wxMerchantBUser) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::add"); | |||
| @@ -41,7 +41,7 @@ public class WxMerchantBUserController extends BaseController { | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantBUser.setTenantId(getTenantId()); | |||
| Long id = wxMerchantBUserService.saveOrUpdate(wxMerchantBUser); | |||
| return new ResultData(Result.SUCCESS,"添加成功",id); | |||
| return new ResultData(Result.SUCCESS, "添加成功", id); | |||
| } | |||
| @ApiOperation("根据id更新接口") | |||
| @@ -49,33 +49,33 @@ public class WxMerchantBUserController extends BaseController { | |||
| public ResultData update(@RequestBody WxMerchantBUser wxMerchantBUser) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::update"); | |||
| Long id = wxMerchantBUserService.saveOrUpdate(wxMerchantBUser); | |||
| return new ResultData(Result.SUCCESS,"更新成功",id); | |||
| return new ResultData(Result.SUCCESS, "更新成功", id); | |||
| } | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::delete"); | |||
| wxMerchantBUserService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantBUserService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMerchantBUserService.getById(id)); | |||
| } | |||
| @ApiOperation("手机号是否存在") | |||
| @GetMapping("/hasphone") | |||
| @ApiImplicitParam(name="phone",value="phone",dataType="String", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "phone", value = "phone", dataType = "String", paramType = "query", required = true) | |||
| public ResultData hasphone(String phone) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantBUserController::hasphone"); | |||
| boolean has=wxMerchantBUserService.hasphone(phone,getTenantId()); | |||
| return new ResultData(Result.SUCCESS,"查询成功",has); | |||
| boolean has = wxMerchantBUserService.hasphone(phone, getTenantId()); | |||
| return new ResultData(Result.SUCCESS, "查询成功", has); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxLevelConfig; | |||
| @@ -37,6 +38,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商户-列表") | |||
| public ResultData list(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| @@ -49,6 +51,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("ETCP商户列表") | |||
| @GetMapping("etcplist") | |||
| @SystemControllerLog(description = "商户-ETCP商户列表") | |||
| public ResultData etcpList(@ModelAttribute WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::etcpList"); | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| @@ -60,6 +63,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商户-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::delete"); | |||
| wxMerchantService.deleteById(id); | |||
| @@ -69,6 +73,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商户-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::findById"); | |||
| WxMerchant wxMerchant = wxMerchantService.getById(id); | |||
| @@ -79,6 +84,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("停用") | |||
| @GetMapping("disable") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "商户-停用") | |||
| public ResultData disable(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::disable"); | |||
| wxMerchantService.disable(id); | |||
| @@ -87,6 +93,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("新增商户接口") | |||
| @PostMapping("addMerchant") | |||
| @SystemControllerLog(description = "商户-新增") | |||
| public ResultData addMerchant(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::addMerchant"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -95,6 +102,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新商户接口") | |||
| @PostMapping("updateMerchant") | |||
| @SystemControllerLog(description = "商户-更新") | |||
| public ResultData updateMerchant(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchant"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -103,6 +111,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新账户接口") | |||
| @PostMapping("updateMerchantAccount") | |||
| @SystemControllerLog(description = "商户-更新账户") | |||
| public ResultData updateMerchantAccount(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAccount"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -111,6 +120,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新管理员接口") | |||
| @PostMapping("updateMerchantAdmin") | |||
| @SystemControllerLog(description = "商户-更新管理员") | |||
| public ResultData updateMerchantAdmin(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAdmin"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -119,6 +129,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新法人接口") | |||
| @PostMapping("updateMerchantCorp") | |||
| @SystemControllerLog(description = "商户-更新法人") | |||
| public ResultData updateMerchantCopr(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantCorp"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -127,6 +138,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新税务接口") | |||
| @PostMapping("updateMerchantTax") | |||
| @SystemControllerLog(description = "商户-更新税务") | |||
| public ResultData updateMerchantTax(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantTax"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -135,6 +147,7 @@ public class WxMerchantController extends BaseController { | |||
| @ApiOperation("更新会员等级权益接口") | |||
| @PostMapping("updateMerchantLevel") | |||
| @SystemControllerLog(description = "商户-更新会员等级权益") | |||
| public ResultData updateMerchantLevel(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantLevel"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxOrderReportDto; | |||
| import com.iformall.domain.vo.WxMerchantMicroPayVo; | |||
| @@ -24,6 +25,7 @@ public class WxMerchantMicroPayController extends BaseController { | |||
| @ApiOperation("获得商场近30日刷卡") | |||
| @GetMapping("/listMonth") | |||
| @SystemControllerLog(description = "收银台-近30日") | |||
| public ResultData listMonth() { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantMicroPayController::listMonth"); | |||
| WxOrderReportDto wxOrderReportDto = new WxOrderReportDto(); | |||
| @@ -36,6 +38,7 @@ public class WxMerchantMicroPayController extends BaseController { | |||
| @ApiOperation("获商户得近30日刷卡") | |||
| @GetMapping("/detail") | |||
| @SystemControllerLog(description = "收银台-近30日刷卡") | |||
| public ResultData detail(@RequestParam Long merchantId) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantMicroPayController::detail"); | |||
| WxOrderReportDto wxOrderReportDto = new WxOrderReportDto(); | |||
| @@ -46,6 +49,7 @@ public class WxMerchantMicroPayController extends BaseController { | |||
| @ApiOperation("获得昨日刷卡列表") | |||
| @GetMapping("/listYesterday") | |||
| @SystemControllerLog(description = "收银台-获得昨日刷卡列表") | |||
| public ResultData listYesterday(@ModelAttribute WxOrderReportDto wxOrderReportDto, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::listYesterday"); | |||
| if (wxOrderReportDto == null) | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMerchantShop; | |||
| @@ -27,6 +28,7 @@ public class WxMerchantShopController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "收银台-获得昨日刷卡列表") | |||
| public ResultData list(@ModelAttribute WxMerchantShop wxMerchantShop, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantShopController::list"); | |||
| if (null == wxMerchantShop) wxMerchantShop = new WxMerchantShop(); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| @@ -37,6 +38,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("补贴记录汇总") | |||
| @GetMapping("sum") | |||
| @SystemControllerLog(description = "商户-补贴记录-汇总") | |||
| public ResultData count(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/sum: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| @@ -64,6 +66,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商户-补贴记录-列表") | |||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| @@ -89,6 +92,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("更新补贴记录") | |||
| @PostMapping("updateSubsidied") | |||
| @SystemControllerLog(description = "商户-更新补贴记录") | |||
| public ResultData updateSubsidied(@RequestBody WxMerchantSubsidy wxMerchantSubsidy) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/update: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| @@ -114,6 +118,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("补贴记录导出") | |||
| @GetMapping("/exportData") | |||
| @SystemControllerLog(description = "商户-补贴记录-导出") | |||
| public void exportData(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.info("[" + getIpAddr() + "] subsidy/exportData"); | |||
| if (wxMerchantSubsidy == null) { | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.vo.WxMerchantTradeDailyVo; | |||
| import com.iformall.service.WxMerchantTradeDailyService; | |||
| @@ -31,6 +32,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商户-获得昨日解单列表") | |||
| public ResultData listYesterday(@ModelAttribute WxMerchantTradeDailyVo wxMerchantTradeDaily, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::listYesterday"); | |||
| if (wxMerchantTradeDaily == null) wxMerchantTradeDaily = new WxMerchantTradeDailyVo(); | |||
| @@ -47,6 +49,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| @ApiOperation("获商户得近30日解单") | |||
| @GetMapping("/detail") | |||
| @SystemControllerLog(description = "商户-获商户得近30日解单detail") | |||
| public ResultData detail(Long merchantId) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::detail"); | |||
| return wxMerchantTradeDailyService.getVolumeOfMonth(merchantId); | |||
| @@ -54,6 +57,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| @ApiOperation("获得商场近30日解单") | |||
| @GetMapping("/listMonth") | |||
| @SystemControllerLog(description = "商户-获得商场近30日解单") | |||
| public ResultData listMonth() { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::listMonth"); | |||
| return wxMerchantTradeDailyService.getVolumeTotalOfMonth(getTenantId()); | |||
| @@ -61,6 +65,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| @ApiOperation("更新解单数据") | |||
| @PostMapping("/updateYesterday") | |||
| @SystemControllerLog(description = "商户-更新解单数据") | |||
| public ResultData updateYesterday(@RequestBody WxMerchantTradeDailyVo wxMerchantTradeDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::updateYesterday"); | |||
| wxMerchantTradeDaily.setTenantId(getTenantId()); | |||
| @@ -69,6 +74,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| @ApiOperation("查询解单数据") | |||
| @GetMapping("/queryTradeDaily") | |||
| @SystemControllerLog(description = "商户-查询解单数据") | |||
| public ResultData queryTradeDaily(@ModelAttribute WxMerchantTradeDailyVo wxMerchantTradeDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::queryTradeDaily"); | |||
| wxMerchantTradeDaily.setTenantId(getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgCallback; | |||
| @@ -28,6 +29,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "短信回调结果-列表") | |||
| public ResultData list(@ModelAttribute WxMsgCallback wxMsgCallback, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::list"); | |||
| if (null == wxMsgCallback) wxMsgCallback = new WxMsgCallback(); | |||
| @@ -39,6 +41,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "短信回调结果-新增") | |||
| public ResultData add(@RequestBody WxMsgCallback wxMsgCallback) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::add"); | |||
| //Assert.notNull(wxMsgCallback.getName(), "角色名不能为空"); | |||
| @@ -50,6 +53,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "短信回调结果-更新") | |||
| public ResultData update(@RequestBody WxMsgCallback wxMsgCallback) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::update"); | |||
| wxMsgCallbackService.saveOrUpdate(wxMsgCallback); | |||
| @@ -59,6 +63,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信回调结果-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::delete"); | |||
| wxMsgCallbackService.deleteById(id); | |||
| @@ -68,6 +73,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信回调结果-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgCallbackService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgConfig; | |||
| @@ -26,6 +27,7 @@ public class WxMsgConfigController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "短信-配置-列表") | |||
| public ResultData list(@ModelAttribute WxMsgConfig wxMsgConfig, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::list"); | |||
| if (null == wxMsgConfig) wxMsgConfig = new WxMsgConfig(); | |||
| @@ -35,6 +37,7 @@ public class WxMsgConfigController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "短信-配置-新增") | |||
| public ResultData add(@RequestBody WxMsgConfig wxMsgConfig) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::add"); | |||
| //Assert.notNull(wxMsgConfig.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxMsgConfigController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "短信-配置-更新") | |||
| public ResultData update(@RequestBody WxMsgConfig wxMsgConfig) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::update"); | |||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | |||
| @@ -54,6 +58,7 @@ public class WxMsgConfigController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信-配置-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::delete"); | |||
| wxMsgConfigService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxMsgConfigController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信-配置-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgConfigService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -56,6 +57,7 @@ public class WxMsgController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "标签短信-列表") | |||
| public ResultData list(@ModelAttribute WxMsg wxMsg, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgController::list"); | |||
| if (null == wxMsg) wxMsg = new WxMsg(); | |||
| @@ -68,6 +70,7 @@ public class WxMsgController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "标签短信-新增") | |||
| public ResultData add(@RequestBody WxMsg wxMsg) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgController::add"); | |||
| //不是草稿检验疲劳度 | |||
| @@ -167,6 +170,7 @@ public class WxMsgController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "标签短信-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgController::delete"); | |||
| wxMsgService.deleteById(id); | |||
| @@ -176,6 +180,7 @@ public class WxMsgController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "标签短信-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgController::findById"); | |||
| WxMsg wxMsg = wxMsgService.getById(id); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgModel; | |||
| @@ -26,6 +27,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "短信模板-列表") | |||
| public ResultData list(@ModelAttribute WxMsgModel wxMsgModel, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::list"); | |||
| if (null == wxMsgModel) wxMsgModel = new WxMsgModel(); | |||
| @@ -37,6 +39,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "短信模板-新增") | |||
| public ResultData add(@RequestBody WxMsgModel wxMsgModel) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::add"); | |||
| //Assert.notNull(wxMsgModel.getName(), "角色名不能为空"); | |||
| @@ -48,6 +51,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "短信模板-更新") | |||
| public ResultData update(@RequestBody WxMsgModel wxMsgModel) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::update"); | |||
| return wxMsgModelService.saveOrUpdate(wxMsgModel); | |||
| @@ -56,6 +60,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信模板-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::delete"); | |||
| wxMsgModelService.deleteById(id); | |||
| @@ -65,6 +70,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "短信模板-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgModelService.getById(id)); | |||
| @@ -72,6 +78,7 @@ public class WxMsgModelController extends BaseController { | |||
| @ApiOperation("获取所有数据") | |||
| @GetMapping("getmodellist") | |||
| @SystemControllerLog(description = "短信模板-获取所有数据") | |||
| public ResultData getmodellist() { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::getmodellist"); | |||
| return wxMsgModelService.getmodellist(getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgSignature; | |||
| @@ -26,6 +27,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "消息签名-列表") | |||
| public ResultData list(@ModelAttribute WxMsgSignature wxMsgSignature, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::list"); | |||
| if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | |||
| @@ -37,6 +39,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "消息签名-新增") | |||
| public ResultData add(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::add"); | |||
| //Assert.notNull(wxMsgSignature.getName(), "角色名不能为空"); | |||
| @@ -48,6 +51,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "消息签名-更新") | |||
| public ResultData update(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::update"); | |||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | |||
| @@ -57,6 +61,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息签名-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::delete"); | |||
| wxMsgSignatureService.deleteById(id); | |||
| @@ -66,6 +71,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息签名-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgSignatureService.getById(id)); | |||
| @@ -73,6 +79,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| @ApiOperation("获取所有数据") | |||
| @GetMapping("getsignaturelist") | |||
| @SystemControllerLog(description = "消息签名-获取所有") | |||
| public ResultData getmodellist() { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::getmodellist"); | |||
| return wxMsgSignatureService.getsignaturelist(getTenantId()); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgValidationcode; | |||
| @@ -17,21 +18,23 @@ import org.springframework.web.bind.annotation.*; | |||
| public class WxMsgValidationcodeController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxMsgValidationcodeService wxMsgValidationcodeService; | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxMsgValidationcode wxMsgValidationcode,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "消息验证码-列表") | |||
| public ResultData list(@ModelAttribute WxMsgValidationcode wxMsgValidationcode, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::list"); | |||
| if (null == wxMsgValidationcode) wxMsgValidationcode = new WxMsgValidationcode(); | |||
| if (null == wxMsgValidationcode) wxMsgValidationcode = new WxMsgValidationcode(); | |||
| final PageInfo<WxMsgValidationcode> page = wxMsgValidationcodeService.listAsPage(wxMsgValidationcode, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "消息验证码-添加") | |||
| public ResultData add(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::add"); | |||
| //Assert.notNull(wxMsgValidationcode.getName(), "角色名不能为空"); | |||
| @@ -41,6 +44,7 @@ public class WxMsgValidationcodeController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "消息验证码-更新") | |||
| public ResultData update(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | |||
| wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | |||
| @@ -48,7 +52,8 @@ public class WxMsgValidationcodeController extends BaseController { | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证码-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | |||
| wxMsgValidationcodeService.deleteById(id); | |||
| @@ -56,23 +61,23 @@ public class WxMsgValidationcodeController extends BaseController { | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证码-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgValidationcodeService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgValidationcodeService.getById(id)); | |||
| } | |||
| @GetMapping("sendvalidationcode") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="tenantId",value="租户ID",dataType="String", paramType = "query"), | |||
| @ApiImplicitParam(name="phone",value="手机号",dataType="String", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="type",value="场景",dataType="Integer", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="appid",value="appid",dataType="String", paramType = "query",required=true)}) | |||
| public ResultData sendvalidationcode(String tenantId,String phone,Integer type,String appid) { | |||
| @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"), | |||
| @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)}) | |||
| public ResultData sendvalidationcode(String tenantId, String phone, Integer type, String appid) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::sendvalidationcode"); | |||
| WxMsgValidationcode wxMsgValidationcode =new WxMsgValidationcode(); | |||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
| wxMsgValidationcode.setTenantId(tenantId); | |||
| wxMsgValidationcode.setPhone(phone); | |||
| wxMsgValidationcode.setType(type); | |||
| @@ -82,14 +87,14 @@ public class WxMsgValidationcodeController extends BaseController { | |||
| @GetMapping("hasvalidationcode") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="tenantId",value="租户ID",dataType="String", paramType = "query"), | |||
| @ApiImplicitParam(name="phone",value="手机号",dataType="String", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="type",value="场景",dataType="Integer", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="code",value="验证码",dataType="String", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="appid",value="appid",dataType="String", paramType = "query",required=true)}) | |||
| public ResultData hasvalidationcode(String tenantId,String phone,Integer type,String code,String appid) { | |||
| @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"), | |||
| @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)}) | |||
| public ResultData hasvalidationcode(String tenantId, String phone, Integer type, String code, String appid) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::hasvalidationcode"); | |||
| WxMsgValidationcode wxMsgValidationcode =new WxMsgValidationcode(); | |||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
| wxMsgValidationcode.setTenantId(tenantId); | |||
| wxMsgValidationcode.setPhone(phone); | |||
| wxMsgValidationcode.setType(type); | |||
| @@ -98,5 +103,5 @@ public class WxMsgValidationcodeController extends BaseController { | |||
| return wxMsgValidationcodeService.hasvalidationcode(wxMsgValidationcode); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgValidationcodeModel; | |||
| @@ -24,6 +25,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "消息验证模板-列表") | |||
| public ResultData list(@ModelAttribute WxMsgValidationcodeModel wxMsgValidationcodeModel, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::list"); | |||
| if (null == wxMsgValidationcodeModel) wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); | |||
| @@ -33,6 +35,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "消息验证模板-添加") | |||
| public ResultData add(@RequestBody WxMsgValidationcodeModel wxMsgValidationcodeModel) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::add"); | |||
| //Assert.notNull(wxMsgValidationcodeModel.getName(), "角色名不能为空"); | |||
| @@ -42,6 +45,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "消息验证模板-更新") | |||
| public ResultData update(@RequestBody WxMsgValidationcodeModel wxMsgValidationcodeModel) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::update"); | |||
| wxMsgValidationcodeModelService.saveOrUpdate(wxMsgValidationcodeModel); | |||
| @@ -50,6 +54,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证模板-删除") | |||
| public ResultData delete(String id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::delete"); | |||
| wxMsgValidationcodeModelService.deleteById(id); | |||
| @@ -58,6 +63,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证模板-查询") | |||
| public ResultData findById(String id) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMsgValidationcodeModelService.getById(id)); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.domain.vo.WxOrderQueryVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -23,7 +24,7 @@ import java.util.Map; | |||
| public class WxOrderController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxOrderService wxOrderService; | |||
| @ApiOperation("分页列表接口") | |||
| @@ -33,6 +34,7 @@ public class WxOrderController extends BaseController { | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "status", value = "订单状态:-1全部;0-已下单/待付款;1-已支付;2-已取消(限定时间内未付款);3-未退款/待退款;4-已退款;5-退款失败", defaultValue = "0", required = false, dataType = "int") | |||
| }) | |||
| @SystemControllerLog(description = "订单管理-列表") | |||
| public ResultData list(@ModelAttribute WxOrder wxOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::list"); | |||
| if (null == wxOrder) wxOrder = new WxOrder(); | |||
| @@ -42,8 +44,9 @@ public class WxOrderController extends BaseController { | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "订单管理-新增") | |||
| public ResultData add(@RequestBody WxOrder wxOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::add"); | |||
| //Assert.notNull(wxOrder.getName(), "角色名不能为空"); | |||
| @@ -54,6 +57,7 @@ public class WxOrderController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "订单管理-更新") | |||
| public ResultData update(@RequestBody WxOrder wxOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::update"); | |||
| wxOrderService.saveOrUpdate(wxOrder); | |||
| @@ -62,19 +66,21 @@ public class WxOrderController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "订单管理-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::delete"); | |||
| wxOrderService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "订单管理-id查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxOrderService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxOrderService.getById(id)); | |||
| } | |||
| @@ -84,9 +90,10 @@ public class WxOrderController extends BaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true) | |||
| }) | |||
| @SystemControllerLog(description = "订单管理-交易列表") | |||
| public ResultData listOrder(@ModelAttribute WxOrderQueryVo wxOrderQueryVo, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::listOrder"); | |||
| if (null == wxOrderQueryVo){ | |||
| if (null == wxOrderQueryVo) { | |||
| wxOrderQueryVo = new WxOrderQueryVo(); | |||
| } | |||
| wxOrderQueryVo.setTenantId(getTenantId()); | |||
| @@ -96,6 +103,7 @@ public class WxOrderController extends BaseController { | |||
| @ApiOperation("交易统计") | |||
| @GetMapping("/queryOrderSummary") | |||
| @SystemControllerLog(description = "订单管理-交易统计") | |||
| public ResultData queryOrderSummary() { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::queryOrderSummary"); | |||
| @@ -105,5 +113,4 @@ public class WxOrderController extends BaseController { | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.vo.WxOrderGroupMarketing; | |||
| import com.iformall.service.WxOrderGroupService; | |||
| @@ -32,6 +33,7 @@ public class WxOrderGroupController extends BaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "订单管理-拼团营销分析") | |||
| public ResultData queryOrderGroupMarketingList(@ModelAttribute WxOrderGroupMarketing wxOrderGroupMarketing, Integer pageNum, Integer pageSize) { | |||
| final PageInfo<WxOrderGroupMarketing> page = wxOrderGroupService.queryOrderGroupMarketingList(wxOrderGroupMarketing, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxPark; | |||
| @@ -26,6 +27,7 @@ public class WxParkController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "停车-列表") | |||
| public ResultData list(@ModelAttribute WxPark wxPark, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxParkController::list"); | |||
| if (null == wxPark) wxPark = new WxPark(); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -20,23 +21,25 @@ import io.swagger.annotations.ApiOperation; | |||
| public class WxPayAccountController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxPayAccountService wxPayAccountService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxPayAccount wxPayAccount,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "支付账号-列表") | |||
| public ResultData list(@ModelAttribute WxPayAccount wxPayAccount, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayAccountController::list"); | |||
| if (null == wxPayAccount) wxPayAccount = new WxPayAccount(); | |||
| if (null == wxPayAccount) wxPayAccount = new WxPayAccount(); | |||
| final PageInfo<WxPayAccount> page = wxPayAccountService.listAsPage(wxPayAccount, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "支付账号-新增") | |||
| public ResultData add(@RequestBody WxPayAccount wxPayAccount) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayAccountController::add"); | |||
| //Assert.notNull(wxPayAccount.getName(), "角色名不能为空"); | |||
| @@ -47,6 +50,7 @@ public class WxPayAccountController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "支付账号-更新") | |||
| public ResultData update(@RequestBody WxPayAccount wxPayAccount) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayAccountController::update"); | |||
| wxPayAccountService.saveOrUpdate(wxPayAccount); | |||
| @@ -55,21 +59,22 @@ public class WxPayAccountController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "支付账号-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayAccountController::delete"); | |||
| wxPayAccountService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "支付账号-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayAccountController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxPayAccountService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayAccountService.getById(id)); | |||
| } | |||
| } | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.service.WxAppinfoService; | |||
| import com.iformall.service.WxProfitSharingOrderService; | |||
| import org.slf4j.Logger; | |||
| @@ -22,7 +23,7 @@ import io.swagger.annotations.ApiOperation; | |||
| public class WxPayOrderController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxPayOrderService wxPayOrderService; | |||
| @Autowired | |||
| @@ -31,21 +32,23 @@ public class WxPayOrderController extends BaseController { | |||
| @Autowired | |||
| private WxAppinfoService wxAppinfoService; | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxPayOrder wxPayOrder,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "支付订单-列表") | |||
| public ResultData list(@ModelAttribute WxPayOrder wxPayOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::list"); | |||
| if (null == wxPayOrder) wxPayOrder = new WxPayOrder(); | |||
| if (null == wxPayOrder) wxPayOrder = new WxPayOrder(); | |||
| final PageInfo<WxPayOrder> page = wxPayOrderService.listAsPage(wxPayOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "支付订单-新增") | |||
| public ResultData add(@RequestBody WxPayOrder wxPayOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::add"); | |||
| //Assert.notNull(wxPayOrder.getName(), "角色名不能为空"); | |||
| @@ -56,6 +59,7 @@ public class WxPayOrderController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "支付订单-更新") | |||
| public ResultData update(@RequestBody WxPayOrder wxPayOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::update"); | |||
| wxPayOrderService.saveOrUpdate(wxPayOrder); | |||
| @@ -64,18 +68,20 @@ public class WxPayOrderController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "支付订单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::delete"); | |||
| wxPayOrderService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "支付订单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::findById"); | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxPayOrderService.getById(id)); | |||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayOrderService.getById(id)); | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderQueryVo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderVo; | |||
| @@ -31,6 +32,7 @@ public class WxProfitSharingOrderController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "分账订单-列表") | |||
| public ResultData list(@ModelAttribute WxProfitSharingOrderQueryVo order, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingOrderController::list"); | |||
| if (null == order) { | |||
| @@ -42,6 +44,7 @@ public class WxProfitSharingOrderController extends BaseController { | |||
| @ApiOperation("交易统计") | |||
| @GetMapping("/queryOrderSummary") | |||
| @SystemControllerLog(description = "分账订单-交易统计") | |||
| public ResultData queryOrderSummary() { | |||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingOrderController::queryOrderSummary"); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| @@ -30,6 +31,7 @@ public class WxProfitSharingReceiverController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "分账接收者-列表") | |||
| public ResultData list(@ModelAttribute WxProfitSharingReceiver receiver, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingReceiverController::list"); | |||
| if (null == receiver) receiver = new WxProfitSharingReceiver(); | |||
| @@ -40,6 +42,7 @@ public class WxProfitSharingReceiverController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "分账接收者-新增") | |||
| public ResultData add(@ModelAttribute WxProfitSharingReceiver receiver) { | |||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingReceiverController::add"); | |||
| @@ -66,6 +69,7 @@ public class WxProfitSharingReceiverController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("del") | |||
| @SystemControllerLog(description = "分账接收者-删除") | |||
| public ResultData delete(@ModelAttribute WxProfitSharingReceiver receiver) { | |||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingReceiverController::delete"); | |||
| if (receiver == null) | |||
| @@ -27,21 +27,21 @@ import java.util.Map; | |||
| @RestController | |||
| @RequestMapping("wxPropertyContract") | |||
| public class WxPropertyContractController extends BaseController { | |||
| @Autowired | |||
| @Autowired | |||
| private WxPropertyContractService wxPropertyContractService; | |||
| @Autowired | |||
| @Autowired | |||
| private WxBillPropertyService wxBillPropertyService; | |||
| private Logger logger = LoggerFactory.getLogger(WxPropertyContractController.class); | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxPropertyContract wxPropertyContract,Integer pageNum, Integer pageSize) { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxPropertyContract wxPropertyContract, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::list"); | |||
| if (null == wxPropertyContract){ | |||
| wxPropertyContract = new WxPropertyContract(); | |||
| if (null == wxPropertyContract) { | |||
| wxPropertyContract = new WxPropertyContract(); | |||
| } | |||
| wxPropertyContract.setTenantId(getTenantId()); | |||
| Map<String, Object> result = wxPropertyContractService.listAsPage(wxPropertyContract, pageNum, pageSize); | |||
| @@ -52,38 +52,38 @@ public class WxPropertyContractController extends BaseController { | |||
| public ResultData add(@RequestBody WxPropertyContract wxPropertyContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::add"); | |||
| wxPropertyContract.setTenantId(getTenantId()); | |||
| return wxPropertyContractService.saveOrUpdate(wxPropertyContract, getUser().getId(),getUser().getName()); | |||
| return wxPropertyContractService.saveOrUpdate(wxPropertyContract, getUser().getId(), getUser().getName()); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxPropertyContract wxPropertyContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::update"); | |||
| wxPropertyContract.setTenantId(getTenantId()); | |||
| return wxPropertyContractService.saveOrUpdate(wxPropertyContract, getUser().getId(),getUser().getName()); | |||
| return wxPropertyContractService.saveOrUpdate(wxPropertyContract, getUser().getId(), getUser().getName()); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::delete"); | |||
| wxPropertyContractService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::findById"); | |||
| WxBillProperty wxBillProperty = new WxBillProperty(); | |||
| wxBillProperty.setTenantId(super.getTenantId()); | |||
| wxBillPropertyService.updateBillStatus(wxBillProperty); | |||
| return wxPropertyContractService.getById(id); | |||
| return wxPropertyContractService.getById(id); | |||
| } | |||
| @RequestMapping("/download") | |||
| public void download(HttpServletRequest request, HttpServletResponse response){ | |||
| public void download(HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxPropertyContractController::download"); | |||
| wxPropertyContractService.download(request,response,getTenantId()); | |||
| wxPropertyContractService.download(request, response, getTenantId()); | |||
| } | |||
| @GetMapping("/getPropertyContractStatusInfo") | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -30,6 +31,7 @@ public class WxQuestionController extends BaseController { | |||
| @ApiOperation("查寻问券配置") | |||
| @GetMapping("getConfig") | |||
| @SystemControllerLog(description = "营销-问券调查-配置获取") | |||
| public Result getQuestionConfig() { | |||
| logger.debug("[" + getIpAddr() + "] WxQuestionController::getQuestionConfig"); | |||
| WxQuestionConfig wxQuestionConfig = new WxQuestionConfig(); | |||
| @@ -52,6 +54,7 @@ public class WxQuestionController extends BaseController { | |||
| @ApiOperation("设置问券配置") | |||
| @PostMapping("setConfig") | |||
| @SystemControllerLog(description = "营销-问券调查-设置") | |||
| public Result setQuestionConfig(@RequestBody WxQuestionConfig wxQuestionConfig) { | |||
| logger.debug("[" + getIpAddr() + "] WxQuestionController::setQuestionConfig"); | |||
| if (wxQuestionConfig == null) | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -29,6 +30,7 @@ public class WxRefundOrderController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "退款-列表") | |||
| public ResultData list(@ModelAttribute WxRefundOrder wxRefundOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxRefundOrderController::list"); | |||
| if (null == wxRefundOrder) wxRefundOrder = new WxRefundOrder(); | |||
| @@ -38,6 +40,7 @@ public class WxRefundOrderController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "退款-新增") | |||
| public ResultData add(@RequestBody WxRefundOrder wxRefundOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxRefundOrderController::add"); | |||
| //Assert.notNull(wxRefundOrder.getName(), "角色名不能为空"); | |||
| @@ -48,6 +51,7 @@ public class WxRefundOrderController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "退款-更新") | |||
| public ResultData update(@RequestBody WxRefundOrder wxRefundOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxRefundOrderController::update"); | |||
| wxRefundOrderService.saveOrUpdate(wxRefundOrder); | |||
| @@ -66,6 +70,7 @@ public class WxRefundOrderController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "退款-id查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxRefundOrderController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxRefundOrderService.getById(id)); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| @@ -34,6 +35,7 @@ public class WxRentContractController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁合同-列表") | |||
| public ResultData list(@ModelAttribute WxRentContract wxRentContract, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::list"); | |||
| if (null == wxRentContract) { | |||
| @@ -45,6 +47,7 @@ public class WxRentContractController extends BaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁合同-添加") | |||
| public ResultData add(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -52,6 +55,7 @@ public class WxRentContractController extends BaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁合同-更新") | |||
| public ResultData update(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::update"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -59,6 +63,7 @@ public class WxRentContractController extends BaseController { | |||
| } | |||
| @PostMapping("updateMoney") | |||
| @SystemControllerLog(description = "租赁合同-更新金额") | |||
| public ResultData updateMoney(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMoney"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -66,6 +71,7 @@ public class WxRentContractController extends BaseController { | |||
| } | |||
| @PostMapping("updateFile") | |||
| @SystemControllerLog(description = "租赁合同-更新文件") | |||
| public ResultData updateFile(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateFile"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -74,6 +80,7 @@ public class WxRentContractController extends BaseController { | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁合同-删除") | |||
| public ResultData delete(String id) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::delete"); | |||
| return wxRentContractService.deleteById(id); | |||
| @@ -81,6 +88,7 @@ public class WxRentContractController extends BaseController { | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁合同-查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::findById"); | |||
| // 同步欠缴状态 | |||
| @@ -97,6 +105,7 @@ public class WxRentContractController extends BaseController { | |||
| } | |||
| @GetMapping("/getRentContractStatusInfo") | |||
| @SystemControllerLog(description = "租赁合同-获取合同状态信息") | |||
| public ResultData getRentContractStatusInfo(@ModelAttribute WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractStatusInfo"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -107,12 +116,14 @@ public class WxRentContractController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "status", value = "status", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁合同-终结合同") | |||
| public ResultData endRentContract(Long id,Integer status) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::endRentContract"); | |||
| return wxRentContractService.endRentContract(id,status); | |||
| } | |||
| @PostMapping("updateMerchant") | |||
| @SystemControllerLog(description = "租赁合同-更新商户") | |||
| public ResultData updateMerchant(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMerchant"); | |||
| return wxRentContractService.updateMerchant(wxRentContract); | |||
| @@ -122,6 +133,7 @@ public class WxRentContractController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁合同-列表") | |||
| public ResultData getRentContractList(@ModelAttribute WxRentContract wxRentContract, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractList"); | |||
| wxRentContract.setTenantId(getTenantId()); | |||
| @@ -131,12 +143,14 @@ public class WxRentContractController extends BaseController { | |||
| @GetMapping("exportContract") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁合同-导出合同") | |||
| public void exportContract(Long id,HttpServletRequest request, HttpServletResponse response){ | |||
| wxRentContractService.exportContract(request,response,getTenantId(),id); | |||
| } | |||
| @GetMapping("updateRentContractStatus") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁合同-更新合同状态") | |||
| public ResultData updateRentContractStatus(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); | |||
| return wxRentContractService.updateRentContractStatus(id); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxScoreHistory; | |||
| @@ -26,6 +27,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "成长值-历史") | |||
| public ResultData list(@ModelAttribute WxScoreHistory wxScoreHistory, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::list"); | |||
| if (null == wxScoreHistory) wxScoreHistory = new WxScoreHistory(); | |||
| @@ -35,6 +37,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "成长值-新增") | |||
| public ResultData add(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::add"); | |||
| //Assert.notNull(wxScoreHistory.getName(), "角色名不能为空"); | |||
| @@ -45,6 +48,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "成长值-更新") | |||
| public ResultData update(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::update"); | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| @@ -54,6 +58,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "成长值-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::delete"); | |||
| wxScoreHistoryService.deleteById(id); | |||
| @@ -63,6 +68,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "成长值-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxScoreHistoryService.getById(id)); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| @@ -25,6 +26,7 @@ public class WxScoreRulesController extends BaseController { | |||
| @ApiOperation("成长值配置") | |||
| @GetMapping("setting") | |||
| @SystemControllerLog(description = "成长值-配置") | |||
| public ResultData list() { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreRulesController::list"); | |||
| WxScoreRules scoreRules = wxScoreRulesService.getScoreRules(getTenantId()); | |||
| @@ -33,6 +35,7 @@ public class WxScoreRulesController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "成长值-配置-新增") | |||
| public ResultData add(@RequestBody WxScoreRules wxScoreRules) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreRulesController::add"); | |||
| wxScoreRules.setTenantId(getTenantId()); | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| @@ -46,6 +47,7 @@ public class WxScreenAdController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "广告屏-广告列表") | |||
| public Result list(@ModelAttribute WxScreenAd wxScreenAd, Integer pageNum, Integer pageSize) { | |||
| if (wxScreenAd == null) wxScreenAd = new WxScreenAd(); | |||
| wxScreenAd.setTenantId(getTenantId()); | |||
| @@ -55,6 +57,7 @@ public class WxScreenAdController extends BaseController { | |||
| @ApiOperation("添加广告") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "广告屏-添加广告") | |||
| public Result add(@RequestBody WxScreenAd wxScreenAd) { | |||
| if (wxScreenAd == null) wxScreenAd = new WxScreenAd(); | |||
| wxScreenAd.setStatus(EnumScreenAdStatus.VALID.getCode()); | |||
| @@ -64,6 +67,7 @@ public class WxScreenAdController extends BaseController { | |||
| @ApiOperation("更新广告") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "广告屏-更新广告") | |||
| public Result update(@RequestBody WxScreenAd wxScreenAd) { | |||
| if (wxScreenAd == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -76,6 +80,7 @@ public class WxScreenAdController extends BaseController { | |||
| @ApiOperation("广告详情") | |||
| @GetMapping("detail") | |||
| @SystemControllerLog(description = "广告屏-广告详情") | |||
| public Result detail(@RequestParam Long id) { | |||
| if (id == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -95,6 +100,7 @@ public class WxScreenAdController extends BaseController { | |||
| @ApiOperation("删除广告") | |||
| @PostMapping("delete") | |||
| @SystemControllerLog(description = "广告屏-删除广告") | |||
| public Result delete(@RequestParam Long id) { | |||
| if (id == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| @@ -35,6 +36,7 @@ public class WxShopController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "店铺管理-列表") | |||
| public ResultData list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::list"); | |||
| if (null == wxShop){ | |||
| @@ -49,6 +51,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "店铺管理-新增") | |||
| public ResultData add(@RequestBody WxShop wxShop) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::add"); | |||
| wxShop.setTenantId(getTenantId()); | |||
| @@ -57,6 +60,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "店铺管理-更新") | |||
| public ResultData update(@RequestBody WxShop wxShop) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::update"); | |||
| return wxShopService.saveOrUpdate(wxShop); | |||
| @@ -64,6 +68,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @SystemControllerLog(description = "店铺管理-删除") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::delete"); | |||
| @@ -74,6 +79,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "店铺管理-id查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxShopService.getById(id)); | |||
| @@ -82,6 +88,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("获取商铺数据") | |||
| @GetMapping("getShopListByShopNumber") | |||
| @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "店铺管理-获取商铺数据") | |||
| public ResultData getbshoplist(String shopNumber) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::getbshoplist"); | |||
| return wxShopService.getbshoplist(getTenantId(), shopNumber); | |||
| @@ -90,6 +97,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("获取商户商铺数据") | |||
| @GetMapping("getMerchantShopByShopId") | |||
| @ApiImplicitParam(name = "shopId", value = "shopId", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "店铺管理-获取商户商铺数据") | |||
| public ResultData getMerchantShopByShopId(String shopId) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::getMerchantShopByShopId"); | |||
| return wxShopService.getMerchantShopByShopId(getTenantId(), shopId); | |||
| @@ -101,6 +109,7 @@ public class WxShopController extends BaseController { | |||
| @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"), | |||
| @ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "店铺管理-查询商铺号是否存在") | |||
| public ResultData hasShopNumber(String shopNumber, Long id, Integer type) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber"); | |||
| return wxShopService.hasShopNumber(getTenantId(), shopNumber, id, type); | |||
| @@ -112,6 +121,7 @@ public class WxShopController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "店铺管理-合同访问") | |||
| public ResultData listShopFromContract(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::listShopFromContract"); | |||
| if (null == wxShop){ | |||
| @@ -125,6 +135,7 @@ public class WxShopController extends BaseController { | |||
| @ApiOperation("导出店铺") | |||
| @GetMapping("/exportShop") | |||
| @SystemControllerLog(description = "店铺管理-导出店铺") | |||
| public void exportShop(@ModelAttribute WxShop wxShop, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxShopController::exportShop"); | |||
| if (null == wxShop){ | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.utils.PayUtil; | |||
| @@ -30,7 +31,7 @@ import java.util.Map; | |||
| public class WxSubsidyController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @Autowired | |||
| private WxSubsidyService wxSubsidyService; | |||
| @ApiOperation("补贴扫码支付发起") | |||
| @@ -42,32 +43,33 @@ public class WxSubsidyController extends BaseController { | |||
| logger.info("subsidyPrepay: " + ipStr + "-" + amount); | |||
| MallUserInfo userInfo = getUser(); | |||
| ResultData resultData = wxSubsidyService.createSubsidy(userInfo, ipStr, amount); | |||
| if(resultData.code == 200) { | |||
| String codeUrl = ((Map<String, String>)resultData.data).get("code_url"); | |||
| if (resultData.code == 200) { | |||
| String codeUrl = ((Map<String, String>) resultData.data).get("code_url"); | |||
| BufferedImage image = PayUtil.getQRCodeImge(codeUrl); | |||
| response.setContentType("image/jpeg"); | |||
| response.setHeader("Pragma","no-cache"); | |||
| response.setHeader("Cache-Control","no-cache"); | |||
| response.setIntHeader("Expires",-1); | |||
| response.setHeader("Pragma", "no-cache"); | |||
| response.setHeader("Cache-Control", "no-cache"); | |||
| response.setIntHeader("Expires", -1); | |||
| ImageIO.write(image, "JPEG", response.getOutputStream()); | |||
| } else { | |||
| throw new MallinkException(resultData.code, resultData.message); | |||
| } | |||
| } | |||
| @ApiOperation("分页列表接口") | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), | |||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData list(@ModelAttribute WxSubsidy wxSubsidy,Integer pageNum, Integer pageSize) { | |||
| if (null == wxSubsidy) wxSubsidy = new WxSubsidy(); | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商城补贴-列表") | |||
| public ResultData list(@ModelAttribute WxSubsidy wxSubsidy, Integer pageNum, Integer pageSize) { | |||
| if (null == wxSubsidy) wxSubsidy = new WxSubsidy(); | |||
| final PageInfo<WxSubsidy> page = wxSubsidyService.listAsPage(wxSubsidy, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxSubsidy wxSubsidy) { | |||
| //Assert.notNull(wxSubsidy.getName(), "角色名不能为空"); | |||
| @@ -85,19 +87,18 @@ public class WxSubsidyController extends BaseController { | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData delete(Long id) { | |||
| wxSubsidyService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxSubsidyService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxSubsidyService.getById(id)); | |||
| } | |||
| } | |||
| @@ -4,6 +4,7 @@ import java.util.ArrayList; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.domain.po.WxTagsGroup; | |||
| import com.iformall.domain.po.WxTagsType; | |||
| import com.iformall.domain.vo.WxTagsGroupVo; | |||
| @@ -81,6 +82,7 @@ public class WxTagsController extends BaseController { | |||
| @ApiOperation("查询微信用户人群") | |||
| @GetMapping("findCUserCountByTag") | |||
| @SystemControllerLog(description = "会员管理-查询微信用户人群") | |||
| public Result findCUserCountByTag(Long[] tagIds) { | |||
| logger.debug("[" + getIpAddr() + "] WxTagsController::findCUserCountByTag"); | |||
| return new ResultData(wxCUserTagsService.findTagListFromCUser(getTenantId(), Arrays.asList(tagIds))); | |||
| @@ -88,6 +90,7 @@ public class WxTagsController extends BaseController { | |||
| @ApiOperation("查询会员用户人群") | |||
| @GetMapping("findCountByTag") | |||
| @SystemControllerLog(description = "会员管理-查询会员用户人群") | |||
| public Result findCountByTag(Long[] tagIds) { | |||
| logger.debug("[" + getIpAddr() + "] WxTagsController::findCountByTag"); | |||
| return new ResultData(wxCUserTagsService.findTagList(getTenantId(), Arrays.asList(tagIds))); | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxUserCouponDto; | |||
| @@ -28,6 +29,7 @@ public class WxUserCouponController extends BaseController { | |||
| @ApiOperation("查询用户卡券接口") | |||
| @PostMapping("findByStatus") | |||
| @SystemControllerLog(description = "会员管理-查询用户卡券接口") | |||
| public ResultData findByStatus(@RequestBody WxUserCouponDto wxUserCoupon) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserCouponController::findByStatus"); | |||
| //根据用户id,用户卡券状态查找 | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | |||
| @@ -57,6 +58,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("查询会员性别结构") | |||
| @GetMapping("/findUserSexStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员性别结构") | |||
| public ResultData findUserSexStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserSexStructure"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -80,6 +82,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("查询会员年龄结构") | |||
| @GetMapping("/findUserAgeStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员年龄结构") | |||
| public ResultData findUserAgeStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserAgeStructure"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -101,8 +104,9 @@ public class WxUserStructureController extends BaseController { | |||
| return new ResultData(vos); | |||
| } | |||
| @ApiOperation("查询会员积分结构") | |||
| @ApiOperation("查询会员成长值结构") | |||
| @GetMapping("/findUserLevelStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员成长值结构") | |||
| public ResultData findUserLevelStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserAgeStructure"); | |||
| WxLevelConfig wxLevelConfig = new WxLevelConfig(); | |||
| @@ -141,6 +145,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("查询会员绑车牌结构") | |||
| @GetMapping("/findUserCarStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员绑车牌结构") | |||
| public ResultData findCarLevelStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findCarLevelStructure"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -182,6 +187,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("查询会员手机品牌结构") | |||
| @GetMapping("/findUserPhoneBandStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员手机品牌结构") | |||
| public ResultData findUserPhoneBandStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserPhoneBandStructure"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -218,6 +224,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("查询会员活跃结构") | |||
| @GetMapping("/findUserActivityStructure") | |||
| @SystemControllerLog(description = "会员管理-查询会员活跃结构") | |||
| public ResultData findUserActivityStructure(Date startTime, Date endTime) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserActivityStructure"); | |||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | |||
| @@ -253,6 +260,7 @@ public class WxUserStructureController extends BaseController { | |||
| /********************************会员数据**************************************/ | |||
| @ApiOperation("查询会员数量") | |||
| @GetMapping("/findUserDataCount") | |||
| @SystemControllerLog(description = "会员管理-查询会员数量") | |||
| public ResultData findUserCount(Date startTime, Date endTime) { | |||
| final int daysBefore = 29; | |||
| @@ -423,6 +431,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "会员管理-拓客分析") | |||
| public ResultData findUserByChannel(@ModelAttribute WxCUser wxCUser, | |||
| Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserByChannel"); | |||
| @@ -458,6 +467,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("获取用户所有渠道") | |||
| @GetMapping("/findUserStructureByChannel") | |||
| @SystemControllerLog(description = "会员管理-获取用户所有渠道") | |||
| public ResultData findUserStructureByChannel(@ModelAttribute WxCUser wxCUser) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserStructureByChannel"); | |||
| List<WxUserChannel> channelStructureList = new ArrayList<>(); | |||
| @@ -501,6 +511,7 @@ public class WxUserStructureController extends BaseController { | |||
| @ApiOperation("获取用户所有渠道") | |||
| @GetMapping("/findAllUserChannel") | |||
| @SystemControllerLog(description = "会员管理-获取用户所有渠道") | |||
| public ResultData findAllUserChannel() { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findAllUserChannel"); | |||
| List<WxUserChannel> channels = wxUserChannelService.findDistinctChannel(); | |||
| @@ -549,6 +560,7 @@ public class WxUserStructureController extends BaseController { | |||
| // 成长值扣除 | |||
| @ApiOperation(value = "用户成长值扣减", notes = "{\"userId\":\"Long\", \"reason\":\"String\", \"score\":\"Integer\"}") | |||
| @PostMapping("/scoreReduce") | |||
| @SystemControllerLog(description = "会员管理-用户成长值扣减") | |||
| public ResultData scoreReduce(@RequestBody Map<String, String> params) { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::scoreReduce"); | |||
| @@ -0,0 +1,171 @@ | |||
| package com.iformall.log; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.annotation.SystemServiceLog; | |||
| import com.iformall.domain.po.MallUserAction; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.enums.EnumMallUserAction; | |||
| import com.iformall.service.MallUserActionService; | |||
| import com.iformall.shiro.UserSession; | |||
| import com.iformall.utils.IPUtil; | |||
| import org.apache.shiro.SecurityUtils; | |||
| import org.aspectj.lang.JoinPoint; | |||
| import org.aspectj.lang.annotation.AfterThrowing; | |||
| import org.aspectj.lang.annotation.Aspect; | |||
| import org.aspectj.lang.annotation.Before; | |||
| import org.aspectj.lang.annotation.Pointcut; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Component; | |||
| import org.springframework.web.context.request.RequestContextHolder; | |||
| import org.springframework.web.context.request.ServletRequestAttributes; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpSession; | |||
| import java.lang.reflect.Method; | |||
| import java.util.Date; | |||
| @Aspect | |||
| @Component | |||
| public class SystemLogAspect { | |||
| private static final Logger logger = LoggerFactory.getLogger(SystemLogAspect.class); | |||
| @Autowired | |||
| private MallUserActionService mallUserActionService; | |||
| @Pointcut("@annotation(com.iformall.annotation.SystemControllerLog)") | |||
| public void controllerAspect(){ | |||
| } | |||
| @Pointcut("@annotation(com.iformall.annotation.SystemServiceLog)") | |||
| public void serviceAspect(){ | |||
| } | |||
| @Before("controllerAspect()") | |||
| public void doBefore(JoinPoint joinPoint) { | |||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||
| MallUserInfo user = (MallUserInfo) request.getSession().getAttribute(UserSession.userInfo); | |||
| if(user == null) { | |||
| logger.error("session 获取 user 失败"); | |||
| return; | |||
| } | |||
| String ipaddress = IPUtil.getIpAddr(request); | |||
| try { | |||
| logger.info("===前置通知开始=== [" + | |||
| (joinPoint.getTarget().getClass().getName() + "." + joinPoint.getSignature().getName()) + "]" + | |||
| getControllerMethodDescription(joinPoint) + " " + user.getUsername() + | |||
| " ip:" + ipaddress); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(user.getTenantId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setUserId(user.getId()); | |||
| action.setActionDesc(getControllerMethodDescription(joinPoint)); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| } catch (Exception e) { | |||
| logger.error("===前置通知异常信息:{}",e.getMessage()); | |||
| } | |||
| } | |||
| /** | |||
| * @Description 异常通知 用于拦截service层记录异常日志 | |||
| * @date 2019年3月29日 | |||
| */ | |||
| @AfterThrowing(pointcut = "serviceAspect()",throwing = "e") | |||
| public void doAfterThrowing(JoinPoint joinPoint,Throwable e){ | |||
| /* | |||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||
| HttpSession session = request.getSession(); | |||
| MallUserInfo user = (MallUserInfo) request.getSession().getAttribute(UserSession.userInfo); | |||
| //获取请求ip | |||
| String ipaddress = IPUtil.getIpAddr(request); | |||
| //获取用户请求方法的参数并序列化为JSON格式字符串 | |||
| String params = ""; | |||
| if (joinPoint.getArgs()!=null&&joinPoint.getArgs().length>0){ | |||
| for (int i = 0; i < joinPoint.getArgs().length; i++) { | |||
| params+= JsonUtils.objectToJson(joinPoint.getArgs()[i])+";"; | |||
| } | |||
| } | |||
| try{ | |||
| // ========控制台输出========= | |||
| System.out.println("=====异常通知开始====="); | |||
| System.out.println("异常代码:" + e.getClass().getName()); | |||
| System.out.println("异常信息:" + e.getMessage()); | |||
| System.out.println("异常方法:" + (joinPoint.getTarget().getClass().getName() + "." + joinPoint.getSignature().getName() + "()")); | |||
| System.out.println("方法描述:" + getServiceMethodDescription(joinPoint)); | |||
| System.out.println("请求人:" + user.getUsername()); | |||
| System.out.println("请求IP:" + ipaddress); | |||
| System.out.println("请求参数:" + params); | |||
| MallUserAction action = new MallUserAction(); | |||
| action.setTenantId(user.getTenantId()); | |||
| action.setUserId(user.getId()); | |||
| action.setType(EnumMallUserAction.CONTROLLER.getCode()); | |||
| action.setIp(ipaddress); | |||
| action.setDesc(getControllerMethodDescription(joinPoint)); | |||
| action.setActionTime(new Date()); | |||
| mallUserActionService.saveOrUpdate(action); | |||
| }catch (Exception ex){ | |||
| //记录本地异常日志 | |||
| logger.error("==异常通知异常=="); | |||
| logger.error("异常信息:{}", ex.getMessage()); | |||
| } | |||
| */ | |||
| } | |||
| /** | |||
| * @author Stormeye | |||
| * @Description 获取注解中对方法的描述信息 用于Controller层注解 | |||
| * @date 2019年3月29日 | |||
| */ | |||
| public static String getControllerMethodDescription(JoinPoint joinPoint) throws Exception { | |||
| String targetName = joinPoint.getTarget().getClass().getName(); | |||
| String methodName = joinPoint.getSignature().getName();//目标方法名 | |||
| Object[] arguments = joinPoint.getArgs(); | |||
| Class targetClass = Class.forName(targetName); | |||
| Method[] methods = targetClass.getMethods(); | |||
| String description = ""; | |||
| for (Method method:methods) { | |||
| if (method.getName().equals(methodName)){ | |||
| Class[] clazzs = method.getParameterTypes(); | |||
| if (clazzs.length==arguments.length){ | |||
| description = method.getAnnotation(SystemControllerLog.class).description(); | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| return description; | |||
| } | |||
| /** | |||
| * @Description 获取注解中对方法的描述信息 用于service层注解 | |||
| * @date 2018年9月3日 下午5:05 | |||
| */ | |||
| public static String getServiceMethodDescription(JoinPoint joinPoint)throws Exception{ | |||
| String targetName = joinPoint.getTarget().getClass().getName(); | |||
| String methodName = joinPoint.getSignature().getName(); | |||
| Object[] arguments = joinPoint.getArgs(); | |||
| Class targetClass = Class.forName(targetName); | |||
| Method[] methods = targetClass.getMethods(); | |||
| String description = ""; | |||
| for (Method method:methods) { | |||
| if (method.getName().equals(methodName)){ | |||
| Class[] clazzs = method.getParameterTypes(); | |||
| if (clazzs.length==arguments.length){ | |||
| description = method.getAnnotation(SystemServiceLog.class).description(); | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| return description; | |||
| } | |||
| } | |||
| @@ -71,6 +71,8 @@ spring: | |||
| password: f8l89&*%%u7f1t22 | |||
| publisher-confirms: true | |||
| virtual-host: / | |||
| flyway: | |||
| enabled: true | |||
| aws: | |||
| clientRegion: cn-northwest-1 | |||
| @@ -59,6 +59,8 @@ spring: | |||
| password: ENC(gBI8mCjr3OC0v57jcnSb660Ux7mW03K2oePgvohhg7w=) | |||
| publisher-confirms: true | |||
| virtual-host: / | |||
| flyway: | |||
| enabled: true | |||
| aws: | |||
| clientRegion: cn-northwest-1 | |||
| @@ -59,6 +59,8 @@ spring: | |||
| password: ENC(GnjF/mdqKdvmDYC0tIIso7+20/jBALPw39tiWCYJ4iw=) | |||
| publisher-confirms: true | |||
| virtual-host: / | |||
| flyway: | |||
| enabled: true | |||
| aws: | |||
| clientRegion: cn-northwest-1 | |||
| @@ -40,6 +40,13 @@ spring: | |||
| # FLOWABLE | |||
| flowable: | |||
| async-executor-activate: false | |||
| aop: | |||
| proxy-target-class: true | |||
| auto: true | |||
| flyway: | |||
| locations: classpath:/db/migration | |||
| baseline-on-migrate: true | |||
| baseline-version: 1 | |||
| # @{link} https://github.com/abel533 | |||
| @@ -0,0 +1,12 @@ | |||
| DROP TABLE IF EXISTS `mall_user_action` ; | |||
| CREATE TABLE `mall_user_action` ( | |||
| `id` bigint(64) NOT NULL, | |||
| `tenant_id` varchar(50) NOT NULL, | |||
| `user_id` bigint(64) NOT NULL COMMENT 'mall_user_id', | |||
| `type` smallint(2) NOT NULL COMMENT '类型 0-controller, 1-service', | |||
| `ip` varchar(25) NOT NULL, | |||
| `action_desc` varchar(200) NOT NULL COMMENT '功能描述', | |||
| `action_time` datetime NOT NULL COMMENT '访问时间', | |||
| PRIMARY KEY (`id`), | |||
| INDEX `id_index` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` ROW_FORMAT=DYNAMIC COMMENT='用户操作记录' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| @@ -0,0 +1,100 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import java.util.List; | |||
| import javax.persistence.Id; | |||
| import java.io.Serializable; | |||
| @Table(name = "mall_user_action") | |||
| @Data | |||
| public class MallUserAction implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @Id | |||
| protected Long id; | |||
| @Transient | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="用户ID",name="userId") | |||
| private Long userId; | |||
| @io.swagger.annotations.ApiModelProperty(value="类型 0-controller, 1-service",name="type") | |||
| private Integer type; | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="ip") | |||
| private String ip; | |||
| @io.swagger.annotations.ApiModelProperty(value="功能描述",name="actionDesc") | |||
| private String actionDesc; | |||
| @io.swagger.annotations.ApiModelProperty(value="访问时间",name="actionTime") | |||
| private Date actionTime; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | |||
| ,UserId_ASC("`user_id` ASC"),UserId_DESC("`user_id` DESC") | |||
| ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") | |||
| ,Ip_ASC("`ip` ASC"),Ip_DESC("`ip` DESC") | |||
| ,Desc_ASC("`action_desc` ASC"),Desc_DESC("`action_desc` DESC") | |||
| ,ActionTime_ASC("`action_time` ASC"),ActionTime_DESC("`action_time` DESC") | |||
| ; | |||
| private String value; | |||
| Field(String value){ | |||
| this.value = value; | |||
| } | |||
| public String getValue() { | |||
| return value; | |||
| } | |||
| public void setCol(String value) { | |||
| this.value = value; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return this.getValue(); | |||
| } | |||
| } | |||
| public void setSortColumns(MallUserAction.Field... fields) | |||
| { | |||
| if (fields == null || fields.length == 0) { | |||
| return; | |||
| } | |||
| for (int k = 0; k < fields.length; k++) { | |||
| if (fields[k] == null) { | |||
| return; | |||
| } | |||
| } | |||
| StringBuilder sb = new StringBuilder(fields[0].toString()); | |||
| for (int k = 1; k < fields.length; k++) { | |||
| sb.append(","); | |||
| sb.append(fields[k].toString()); | |||
| } | |||
| this.sortColumns = sb.toString(); | |||
| } | |||
| public void setSortColumns(String sortColumns) | |||
| { | |||
| if (sortColumns == null || "".equals(sortColumns.trim())) { | |||
| return; | |||
| } | |||
| if (sortColumns.contains(",")) { | |||
| String[] cols = sortColumns.split(","); | |||
| java.util.List<Field> fList = new java.util.ArrayList(); | |||
| for (int k = 0; k < cols.length; k++) { | |||
| fList.add(Field.valueOf(cols[k])); | |||
| } | |||
| this.setSortColumns(fList.toArray(new Field[fList.size()])); | |||
| } else { | |||
| this.setSortColumns(Field.valueOf(sortColumns)); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,36 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| * Created by Stormeye on 2018/08/09. | |||
| */ | |||
| public enum EnumMallUserAction { | |||
| CONTROLLER(0, "Controller"), | |||
| SERVICE(1, "Service") | |||
| ; | |||
| public static EnumMallUserAction getEnum(Integer code) { | |||
| for (EnumMallUserAction value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumMallUserAction(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.iformall.mapper; | |||
| import java.util.*; | |||
| import com.iformall.common.CommonMapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import com.iformall.domain.po.MallUserAction; | |||
| public interface MallUserActionMapper extends CommonMapper<MallUserAction, Long> { | |||
| List<MallUserAction> findList(MallUserAction mallUserAction); | |||
| } | |||
| @@ -0,0 +1,48 @@ | |||
| package com.iformall.service; | |||
| import java.util.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.MallUserAction; | |||
| public interface MallUserActionService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<MallUserAction> listAsPage(MallUserAction record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| MallUserAction getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(MallUserAction record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| } | |||
| @@ -0,0 +1,52 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.MallUserAction; | |||
| import com.iformall.mapper.MallUserActionMapper; | |||
| import com.iformall.service.MallUserActionService; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class MallUserActionServiceImpl implements MallUserActionService { | |||
| @Autowired | |||
| MallUserActionMapper mallUserActionMapper; | |||
| @Override | |||
| public PageInfo<MallUserAction> listAsPage(MallUserAction record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> mallUserActionMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public MallUserAction getById(Long id) { | |||
| return mallUserActionMapper.selectByPrimaryKey(id); | |||
| } | |||
| @Override | |||
| public void saveOrUpdate(MallUserAction record) { | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| mallUserActionMapper.insertSelective(record); | |||
| } else { | |||
| mallUserActionMapper.updateByPrimaryKeySelective(record); | |||
| } | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| mallUserActionMapper.deleteByPrimaryKey(id); | |||
| } | |||
| } | |||
| @@ -0,0 +1,56 @@ | |||
| <?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"> | |||
| <mapper namespace="com.iformall.mapper.MallUserActionMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.MallUserAction"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="user_id" jdbcType="BIGINT" property="userId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="ip" jdbcType="VARCHAR" property="ip" /> | |||
| <result column="desc" jdbcType="VARCHAR" property="desc" /> | |||
| <result column="action_time" jdbcType="TIMESTAMP" property="actionTime" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`user_id`,`type`,`ip`,`desc`,`action_time` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != userId "> | |||
| and `user_id` = #{userId} | |||
| </if> | |||
| <if test=" null != type "> | |||
| and `type` = #{type} | |||
| </if> | |||
| <if test=" null != ip "> | |||
| and `ip` like concat('%', #{ip},'%') | |||
| </if> | |||
| <if test=" null != desc "> | |||
| and `desc` like concat('%', #{desc},'%') | |||
| </if> | |||
| <if test=" null != actionTime "> | |||
| and `action_time` = #{actionTime} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.MallUserAction" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from mall_user_action | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||