| @@ -0,0 +1,36 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
| <modelVersion>4.0.0</modelVersion> | |||
| <parent> | |||
| <artifactId>mallink</artifactId> | |||
| <groupId>com.simple</groupId> | |||
| <version>1.0</version> | |||
| </parent> | |||
| <artifactId>mallinkAdmin</artifactId> | |||
| <dependencies> | |||
| <dependency> | |||
| <groupId>com.simple</groupId> | |||
| <artifactId>mallinkService</artifactId> | |||
| <version>1.0</version> | |||
| </dependency> | |||
| </dependencies> | |||
| <build> | |||
| <plugins> | |||
| <plugin> | |||
| <groupId>org.springframework.boot</groupId> | |||
| <artifactId>spring-boot-maven-plugin</artifactId> | |||
| <configuration> | |||
| <executable>true</executable> | |||
| </configuration> | |||
| </plugin> | |||
| </plugins> | |||
| </build> | |||
| </project> | |||
| @@ -0,0 +1,35 @@ | |||
| package com.simple.controller; | |||
| import java.beans.PropertyEditorSupport; | |||
| import java.text.ParseException; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.Date; | |||
| import org.springframework.web.bind.WebDataBinder; | |||
| import org.springframework.web.bind.annotation.InitBinder; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| @RestController | |||
| public class BaseController { | |||
| @InitBinder | |||
| public void InitBinder(WebDataBinder dataBinder) { | |||
| dataBinder.registerCustomEditor(Date.class, new PropertyEditorSupport() { | |||
| public void setAsText(String value) { | |||
| try { | |||
| setValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(value)); | |||
| } catch(ParseException e) { | |||
| try { | |||
| setValue(new SimpleDateFormat("yyyy-MM-dd ").parse(value)); | |||
| } catch (ParseException e1) { | |||
| setValue(null); | |||
| } | |||
| } | |||
| } | |||
| public String getAsText() { | |||
| return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date) getValue()); | |||
| } | |||
| }); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxAppinfo; | |||
| import com.simple.service.WxAppinfoService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxAppinfo") | |||
| public class WxAppinfoController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxAppinfoService wxAppinfoService; | |||
| private Logger logger = Logger.getLogger(WxAppinfoController.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 WxAppinfo wxAppinfo,Integer pageNum, Integer pageSize) { | |||
| if (null == wxAppinfo) wxAppinfo = new WxAppinfo(); | |||
| final PageInfo<WxAppinfo> page = wxAppinfoService.listAsPage(wxAppinfo, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxAppinfo wxAppinfo) { | |||
| //Assert.notNull(wxAppinfo.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxAppinfoService.saveOrUpdate(wxAppinfo); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxAppinfo wxAppinfo) { | |||
| wxAppinfoService.saveOrUpdate(wxAppinfo); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxAppinfoService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxAppinfoService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBLog; | |||
| import com.simple.service.WxBLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBLog") | |||
| public class WxBLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBLogService wxBLogService; | |||
| private Logger logger = Logger.getLogger(WxBLogController.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 WxBLog wxBLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBLog) wxBLog = new WxBLog(); | |||
| final PageInfo<WxBLog> page = wxBLogService.listAsPage(wxBLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBLog wxBLog) { | |||
| //Assert.notNull(wxBLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBLog wxBLog) { | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBUserMerchant; | |||
| import com.simple.service.WxBUserMerchantService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBUserMerchant") | |||
| public class WxBUserMerchantController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBUserMerchantService wxBUserMerchantService; | |||
| private Logger logger = Logger.getLogger(WxBUserMerchantController.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 WxBUserMerchant wxBUserMerchant,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBUserMerchant) wxBUserMerchant = new WxBUserMerchant(); | |||
| final PageInfo<WxBUserMerchant> page = wxBUserMerchantService.listAsPage(wxBUserMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBUserMerchant wxBUserMerchant) { | |||
| //Assert.notNull(wxBUserMerchant.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBUserMerchantService.saveOrUpdate(wxBUserMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBUserMerchant wxBUserMerchant) { | |||
| wxBUserMerchantService.saveOrUpdate(wxBUserMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBUserMerchantService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBUserMerchantService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBanners; | |||
| import com.simple.service.WxBannersService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBanners") | |||
| public class WxBannersController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBannersService wxBannersService; | |||
| private Logger logger = Logger.getLogger(WxBannersController.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 WxBanners wxBanners,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBanners) wxBanners = new WxBanners(); | |||
| final PageInfo<WxBanners> page = wxBannersService.listAsPage(wxBanners, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBanners wxBanners) { | |||
| //Assert.notNull(wxBanners.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBannersService.saveOrUpdate(wxBanners); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBanners wxBanners) { | |||
| wxBannersService.saveOrUpdate(wxBanners); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBannersService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBannersService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBusiness; | |||
| import com.simple.service.WxBusinessService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBusiness") | |||
| public class WxBusinessController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBusinessService wxBusinessService; | |||
| private Logger logger = Logger.getLogger(WxBusinessController.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 WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBusiness) wxBusiness = new WxBusiness(); | |||
| final PageInfo<WxBusiness> page = wxBusinessService.listAsPage(wxBusiness, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBusiness wxBusiness) { | |||
| //Assert.notNull(wxBusiness.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBusinessService.saveOrUpdate(wxBusiness); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBusiness wxBusiness) { | |||
| wxBusinessService.saveOrUpdate(wxBusiness); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBusinessService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBusinessService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCLog; | |||
| import com.simple.service.WxCLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCLog") | |||
| public class WxCLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCLogService wxCLogService; | |||
| private Logger logger = Logger.getLogger(WxCLogController.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 WxCLog wxCLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCLog) wxCLog = new WxCLog(); | |||
| final PageInfo<WxCLog> page = wxCLogService.listAsPage(wxCLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCLog wxCLog) { | |||
| //Assert.notNull(wxCLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCLogService.saveOrUpdate(wxCLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCLog wxCLog) { | |||
| wxCLogService.saveOrUpdate(wxCLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserCars; | |||
| import com.simple.service.WxCUserCarsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserCars") | |||
| public class WxCUserCarsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserCarsService wxCUserCarsService; | |||
| private Logger logger = Logger.getLogger(WxCUserCarsController.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 WxCUserCars wxCUserCars,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserCars) wxCUserCars = new WxCUserCars(); | |||
| final PageInfo<WxCUserCars> page = wxCUserCarsService.listAsPage(wxCUserCars, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserCars wxCUserCars) { | |||
| //Assert.notNull(wxCUserCars.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserCarsService.saveOrUpdate(wxCUserCars); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserCars wxCUserCars) { | |||
| wxCUserCarsService.saveOrUpdate(wxCUserCars); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserCarsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserCloud; | |||
| import com.simple.service.WxCUserCloudService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserCloud") | |||
| public class WxCUserCloudController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserCloudService wxCUserCloudService; | |||
| private Logger logger = Logger.getLogger(WxCUserCloudController.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 WxCUserCloud wxCUserCloud,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserCloud) wxCUserCloud = new WxCUserCloud(); | |||
| final PageInfo<WxCUserCloud> page = wxCUserCloudService.listAsPage(wxCUserCloud, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserCloud wxCUserCloud) { | |||
| //Assert.notNull(wxCUserCloud.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserCloudService.saveOrUpdate(wxCUserCloud); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserCloud wxCUserCloud) { | |||
| wxCUserCloudService.saveOrUpdate(wxCUserCloud); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserCloudService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserCloudService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUser; | |||
| import com.simple.service.WxCUserService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUser") | |||
| public class WxCUserController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserService wxCUserService; | |||
| private Logger logger = Logger.getLogger(WxCUserController.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 WxCUser wxCUser,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUser) wxCUser = new WxCUser(); | |||
| final PageInfo<WxCUser> page = wxCUserService.listAsPage(wxCUser, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUser wxCUser) { | |||
| //Assert.notNull(wxCUser.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserService.saveOrUpdate(wxCUser); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUser wxCUser) { | |||
| wxCUserService.saveOrUpdate(wxCUser); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserTags; | |||
| import com.simple.service.WxCUserTagsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserTags") | |||
| public class WxCUserTagsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserTagsService wxCUserTagsService; | |||
| private Logger logger = Logger.getLogger(WxCUserTagsController.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 WxCUserTags wxCUserTags,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserTags) wxCUserTags = new WxCUserTags(); | |||
| final PageInfo<WxCUserTags> page = wxCUserTagsService.listAsPage(wxCUserTags, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserTags wxCUserTags) { | |||
| //Assert.notNull(wxCUserTags.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserTagsService.saveOrUpdate(wxCUserTags); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserTags wxCUserTags) { | |||
| wxCUserTagsService.saveOrUpdate(wxCUserTags); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserTagsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserTagsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponActionLog; | |||
| import com.simple.service.WxCouponActionLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponActionLog") | |||
| public class WxCouponActionLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponActionLogService wxCouponActionLogService; | |||
| private Logger logger = Logger.getLogger(WxCouponActionLogController.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 WxCouponActionLog wxCouponActionLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponActionLog) wxCouponActionLog = new WxCouponActionLog(); | |||
| final PageInfo<WxCouponActionLog> page = wxCouponActionLogService.listAsPage(wxCouponActionLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| //Assert.notNull(wxCouponActionLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponActionLogService.saveOrUpdate(wxCouponActionLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| wxCouponActionLogService.saveOrUpdate(wxCouponActionLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponActionLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponActionLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponActivity; | |||
| import com.simple.service.WxCouponActivityService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponActivity") | |||
| public class WxCouponActivityController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponActivityService wxCouponActivityService; | |||
| private Logger logger = Logger.getLogger(WxCouponActivityController.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 WxCouponActivity wxCouponActivity,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponActivity) wxCouponActivity = new WxCouponActivity(); | |||
| final PageInfo<WxCouponActivity> page = wxCouponActivityService.listAsPage(wxCouponActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponActivity wxCouponActivity) { | |||
| //Assert.notNull(wxCouponActivity.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponActivityService.saveOrUpdate(wxCouponActivity); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponActivity wxCouponActivity) { | |||
| wxCouponActivityService.saveOrUpdate(wxCouponActivity); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponActivityService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponActivityService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCoupon; | |||
| import com.simple.service.WxCouponService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCoupon") | |||
| public class WxCouponController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| private Logger logger = Logger.getLogger(WxCouponController.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 WxCoupon wxCoupon,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCoupon) wxCoupon = new WxCoupon(); | |||
| final PageInfo<WxCoupon> page = wxCouponService.listAsPage(wxCoupon, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCoupon wxCoupon) { | |||
| //Assert.notNull(wxCoupon.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponService.saveOrUpdate(wxCoupon); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCoupon wxCoupon) { | |||
| wxCouponService.saveOrUpdate(wxCoupon); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponRecord; | |||
| import com.simple.service.WxCouponRecordService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponRecord") | |||
| public class WxCouponRecordController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponRecordService wxCouponRecordService; | |||
| private Logger logger = Logger.getLogger(WxCouponRecordController.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 WxCouponRecord wxCouponRecord,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponRecord) wxCouponRecord = new WxCouponRecord(); | |||
| final PageInfo<WxCouponRecord> page = wxCouponRecordService.listAsPage(wxCouponRecord, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponRecord wxCouponRecord) { | |||
| //Assert.notNull(wxCouponRecord.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponRecordService.saveOrUpdate(wxCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponRecord wxCouponRecord) { | |||
| wxCouponRecordService.saveOrUpdate(wxCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponRecordService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponRecordService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponType; | |||
| import com.simple.service.WxCouponTypeService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponType") | |||
| public class WxCouponTypeController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponTypeService wxCouponTypeService; | |||
| private Logger logger = Logger.getLogger(WxCouponTypeController.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 WxCouponType wxCouponType,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponType) wxCouponType = new WxCouponType(); | |||
| final PageInfo<WxCouponType> page = wxCouponTypeService.listAsPage(wxCouponType, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponType wxCouponType) { | |||
| //Assert.notNull(wxCouponType.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponTypeService.saveOrUpdate(wxCouponType); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponType wxCouponType) { | |||
| wxCouponTypeService.saveOrUpdate(wxCouponType); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponTypeService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponTypeService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpCouponRecord; | |||
| import com.simple.service.WxEtcpCouponRecordService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpCouponRecord") | |||
| public class WxEtcpCouponRecordController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpCouponRecordService wxEtcpCouponRecordService; | |||
| private Logger logger = Logger.getLogger(WxEtcpCouponRecordController.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 WxEtcpCouponRecord wxEtcpCouponRecord,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpCouponRecord) wxEtcpCouponRecord = new WxEtcpCouponRecord(); | |||
| final PageInfo<WxEtcpCouponRecord> page = wxEtcpCouponRecordService.listAsPage(wxEtcpCouponRecord, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpCouponRecord wxEtcpCouponRecord) { | |||
| //Assert.notNull(wxEtcpCouponRecord.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpCouponRecordService.saveOrUpdate(wxEtcpCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpCouponRecord wxEtcpCouponRecord) { | |||
| wxEtcpCouponRecordService.saveOrUpdate(wxEtcpCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpCouponRecordService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpCouponRecordService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkDissolution; | |||
| import com.simple.service.WxEtcpParkDissolutionService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkDissolution") | |||
| public class WxEtcpParkDissolutionController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkDissolutionService wxEtcpParkDissolutionService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkDissolutionController.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 WxEtcpParkDissolution wxEtcpParkDissolution,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkDissolution) wxEtcpParkDissolution = new WxEtcpParkDissolution(); | |||
| final PageInfo<WxEtcpParkDissolution> page = wxEtcpParkDissolutionService.listAsPage(wxEtcpParkDissolution, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkDissolution wxEtcpParkDissolution) { | |||
| //Assert.notNull(wxEtcpParkDissolution.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkDissolutionService.saveOrUpdate(wxEtcpParkDissolution); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkDissolution wxEtcpParkDissolution) { | |||
| wxEtcpParkDissolutionService.saveOrUpdate(wxEtcpParkDissolution); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkDissolutionService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkDissolutionService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkIn; | |||
| import com.simple.service.WxEtcpParkInService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkIn") | |||
| public class WxEtcpParkInController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkInService wxEtcpParkInService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkInController.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 WxEtcpParkIn wxEtcpParkIn,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkIn) wxEtcpParkIn = new WxEtcpParkIn(); | |||
| final PageInfo<WxEtcpParkIn> page = wxEtcpParkInService.listAsPage(wxEtcpParkIn, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkIn wxEtcpParkIn) { | |||
| //Assert.notNull(wxEtcpParkIn.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkInService.saveOrUpdate(wxEtcpParkIn); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkIn wxEtcpParkIn) { | |||
| wxEtcpParkInService.saveOrUpdate(wxEtcpParkIn); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkInService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkInService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkMsgSuc; | |||
| import com.simple.service.WxEtcpParkMsgSucService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkMsgSuc") | |||
| public class WxEtcpParkMsgSucController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkMsgSucService wxEtcpParkMsgSucService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkMsgSucController.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 WxEtcpParkMsgSuc wxEtcpParkMsgSuc,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkMsgSuc) wxEtcpParkMsgSuc = new WxEtcpParkMsgSuc(); | |||
| final PageInfo<WxEtcpParkMsgSuc> page = wxEtcpParkMsgSucService.listAsPage(wxEtcpParkMsgSuc, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkMsgSuc wxEtcpParkMsgSuc) { | |||
| //Assert.notNull(wxEtcpParkMsgSuc.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkMsgSucService.saveOrUpdate(wxEtcpParkMsgSuc); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkMsgSuc wxEtcpParkMsgSuc) { | |||
| wxEtcpParkMsgSucService.saveOrUpdate(wxEtcpParkMsgSuc); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkMsgSucService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkMsgSucService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkOrderunpay; | |||
| import com.simple.service.WxEtcpParkOrderunpayService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkOrderunpay") | |||
| public class WxEtcpParkOrderunpayController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkOrderunpayService wxEtcpParkOrderunpayService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkOrderunpayController.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 WxEtcpParkOrderunpay wxEtcpParkOrderunpay,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkOrderunpay) wxEtcpParkOrderunpay = new WxEtcpParkOrderunpay(); | |||
| final PageInfo<WxEtcpParkOrderunpay> page = wxEtcpParkOrderunpayService.listAsPage(wxEtcpParkOrderunpay, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkOrderunpay wxEtcpParkOrderunpay) { | |||
| //Assert.notNull(wxEtcpParkOrderunpay.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkOrderunpayService.saveOrUpdate(wxEtcpParkOrderunpay); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkOrderunpay wxEtcpParkOrderunpay) { | |||
| wxEtcpParkOrderunpayService.saveOrUpdate(wxEtcpParkOrderunpay); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkOrderunpayService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkOrderunpayService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkOut; | |||
| import com.simple.service.WxEtcpParkOutService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkOut") | |||
| public class WxEtcpParkOutController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkOutService wxEtcpParkOutService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkOutController.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 WxEtcpParkOut wxEtcpParkOut,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkOut) wxEtcpParkOut = new WxEtcpParkOut(); | |||
| final PageInfo<WxEtcpParkOut> page = wxEtcpParkOutService.listAsPage(wxEtcpParkOut, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkOut wxEtcpParkOut) { | |||
| //Assert.notNull(wxEtcpParkOut.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkOutService.saveOrUpdate(wxEtcpParkOut); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkOut wxEtcpParkOut) { | |||
| wxEtcpParkOutService.saveOrUpdate(wxEtcpParkOut); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkOutService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkOutService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkTransaction; | |||
| import com.simple.service.WxEtcpParkTransactionService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkTransaction") | |||
| public class WxEtcpParkTransactionController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkTransactionService wxEtcpParkTransactionService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkTransactionController.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 WxEtcpParkTransaction wxEtcpParkTransaction,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkTransaction) wxEtcpParkTransaction = new WxEtcpParkTransaction(); | |||
| final PageInfo<WxEtcpParkTransaction> page = wxEtcpParkTransactionService.listAsPage(wxEtcpParkTransaction, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkTransaction wxEtcpParkTransaction) { | |||
| //Assert.notNull(wxEtcpParkTransaction.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkTransactionService.saveOrUpdate(wxEtcpParkTransaction); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkTransaction wxEtcpParkTransaction) { | |||
| wxEtcpParkTransactionService.saveOrUpdate(wxEtcpParkTransaction); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkTransactionService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkTransactionService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkUnbind; | |||
| import com.simple.service.WxEtcpParkUnbindService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkUnbind") | |||
| public class WxEtcpParkUnbindController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkUnbindService wxEtcpParkUnbindService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkUnbindController.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 WxEtcpParkUnbind wxEtcpParkUnbind,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkUnbind) wxEtcpParkUnbind = new WxEtcpParkUnbind(); | |||
| final PageInfo<WxEtcpParkUnbind> page = wxEtcpParkUnbindService.listAsPage(wxEtcpParkUnbind, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkUnbind wxEtcpParkUnbind) { | |||
| //Assert.notNull(wxEtcpParkUnbind.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkUnbindService.saveOrUpdate(wxEtcpParkUnbind); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkUnbind wxEtcpParkUnbind) { | |||
| wxEtcpParkUnbindService.saveOrUpdate(wxEtcpParkUnbind); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkUnbindService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkUnbindService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxFlashSale; | |||
| import com.simple.service.WxFlashSaleService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxFlashSale") | |||
| public class WxFlashSaleController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxFlashSaleService wxFlashSaleService; | |||
| private Logger logger = Logger.getLogger(WxFlashSaleController.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 WxFlashSale wxFlashSale,Integer pageNum, Integer pageSize) { | |||
| if (null == wxFlashSale) wxFlashSale = new WxFlashSale(); | |||
| final PageInfo<WxFlashSale> page = wxFlashSaleService.listAsPage(wxFlashSale, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxFlashSale wxFlashSale) { | |||
| //Assert.notNull(wxFlashSale.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxFlashSaleService.saveOrUpdate(wxFlashSale); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxFlashSale wxFlashSale) { | |||
| wxFlashSaleService.saveOrUpdate(wxFlashSale); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxFlashSaleService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxFlashSaleService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMallBuilding; | |||
| import com.simple.service.WxMallBuildingService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMallBuilding") | |||
| public class WxMallBuildingController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallBuildingService wxMallBuildingService; | |||
| private Logger logger = Logger.getLogger(WxMallBuildingController.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 WxMallBuilding wxMallBuilding,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMallBuilding) wxMallBuilding = new WxMallBuilding(); | |||
| final PageInfo<WxMallBuilding> page = wxMallBuildingService.listAsPage(wxMallBuilding, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| //Assert.notNull(wxMallBuilding.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallBuildingService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallBuildingService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMall; | |||
| import com.simple.service.WxMallService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMall") | |||
| public class WxMallController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallService wxMallService; | |||
| private Logger logger = Logger.getLogger(WxMallController.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 WxMall wxMall,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMall) wxMall = new WxMall(); | |||
| final PageInfo<WxMall> page = wxMallService.listAsPage(wxMall, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMall wxMall) { | |||
| //Assert.notNull(wxMall.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallService.saveOrUpdate(wxMall); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMall wxMall) { | |||
| wxMallService.saveOrUpdate(wxMall); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMallFloor; | |||
| import com.simple.service.WxMallFloorService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMallFloor") | |||
| public class WxMallFloorController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallFloorService wxMallFloorService; | |||
| private Logger logger = Logger.getLogger(WxMallFloorController.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 WxMallFloor wxMallFloor,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMallFloor) wxMallFloor = new WxMallFloor(); | |||
| final PageInfo<WxMallFloor> page = wxMallFloorService.listAsPage(wxMallFloor, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMallFloor wxMallFloor) { | |||
| //Assert.notNull(wxMallFloor.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMallFloor wxMallFloor) { | |||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallFloorService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallFloorService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchant; | |||
| import com.simple.service.WxMerchantService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchant") | |||
| public class WxMerchantController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantService wxMerchantService; | |||
| private Logger logger = Logger.getLogger(WxMerchantController.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 WxMerchant wxMerchant,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchant wxMerchant) { | |||
| //Assert.notNull(wxMerchant.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantService.saveOrUpdate(wxMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchant wxMerchant) { | |||
| wxMerchantService.saveOrUpdate(wxMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchantShop; | |||
| import com.simple.service.WxMerchantShopService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchantShop") | |||
| public class WxMerchantShopController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantShopService wxMerchantShopService; | |||
| private Logger logger = Logger.getLogger(WxMerchantShopController.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 WxMerchantShop wxMerchantShop,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchantShop) wxMerchantShop = new WxMerchantShop(); | |||
| final PageInfo<WxMerchantShop> page = wxMerchantShopService.listAsPage(wxMerchantShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchantShop wxMerchantShop) { | |||
| //Assert.notNull(wxMerchantShop.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantShopService.saveOrUpdate(wxMerchantShop); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchantShop wxMerchantShop) { | |||
| wxMerchantShopService.saveOrUpdate(wxMerchantShop); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantShopService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantShopService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchantTradeDays; | |||
| import com.simple.service.WxMerchantTradeDaysService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchantTradeDays") | |||
| public class WxMerchantTradeDaysController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantTradeDaysService wxMerchantTradeDaysService; | |||
| private Logger logger = Logger.getLogger(WxMerchantTradeDaysController.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 WxMerchantTradeDays wxMerchantTradeDays,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchantTradeDays) wxMerchantTradeDays = new WxMerchantTradeDays(); | |||
| final PageInfo<WxMerchantTradeDays> page = wxMerchantTradeDaysService.listAsPage(wxMerchantTradeDays, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchantTradeDays wxMerchantTradeDays) { | |||
| //Assert.notNull(wxMerchantTradeDays.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantTradeDaysService.saveOrUpdate(wxMerchantTradeDays); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchantTradeDays wxMerchantTradeDays) { | |||
| wxMerchantTradeDaysService.saveOrUpdate(wxMerchantTradeDays); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantTradeDaysService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantTradeDaysService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsg; | |||
| import com.simple.service.WxMsgService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsg") | |||
| public class WxMsgController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgService wxMsgService; | |||
| private Logger logger = Logger.getLogger(WxMsgController.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 WxMsg wxMsg,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsg) wxMsg = new WxMsg(); | |||
| final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsg wxMsg) { | |||
| //Assert.notNull(wxMsg.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgService.saveOrUpdate(wxMsg); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsg wxMsg) { | |||
| wxMsgService.saveOrUpdate(wxMsg); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsgModel; | |||
| import com.simple.service.WxMsgModelService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsgModel") | |||
| public class WxMsgModelController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgModelService wxMsgModelService; | |||
| private Logger logger = Logger.getLogger(WxMsgModelController.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 WxMsgModel wxMsgModel,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsgModel) wxMsgModel = new WxMsgModel(); | |||
| final PageInfo<WxMsgModel> page = wxMsgModelService.listAsPage(wxMsgModel, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsgModel wxMsgModel) { | |||
| //Assert.notNull(wxMsgModel.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgModelService.saveOrUpdate(wxMsgModel); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsgModel wxMsgModel) { | |||
| wxMsgModelService.saveOrUpdate(wxMsgModel); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgModelService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgModelService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsgSignature; | |||
| import com.simple.service.WxMsgSignatureService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsgSignature") | |||
| public class WxMsgSignatureController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgSignatureService wxMsgSignatureService; | |||
| private Logger logger = Logger.getLogger(WxMsgSignatureController.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 WxMsgSignature wxMsgSignature,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | |||
| final PageInfo<WxMsgSignature> page = wxMsgSignatureService.listAsPage(wxMsgSignature, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| //Assert.notNull(wxMsgSignature.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgSignatureService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgSignatureService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxOrders; | |||
| import com.simple.service.WxOrdersService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxOrders") | |||
| public class WxOrdersController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxOrdersService wxOrdersService; | |||
| private Logger logger = Logger.getLogger(WxOrdersController.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 WxOrders wxOrders,Integer pageNum, Integer pageSize) { | |||
| if (null == wxOrders) wxOrders = new WxOrders(); | |||
| final PageInfo<WxOrders> page = wxOrdersService.listAsPage(wxOrders, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxOrders wxOrders) { | |||
| //Assert.notNull(wxOrders.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxOrdersService.saveOrUpdate(wxOrders); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxOrders wxOrders) { | |||
| wxOrdersService.saveOrUpdate(wxOrders); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxOrdersService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxOrdersService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxPark; | |||
| import com.simple.service.WxParkService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxPark") | |||
| public class WxParkController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxParkService wxParkService; | |||
| private Logger logger = Logger.getLogger(WxParkController.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 WxPark wxPark,Integer pageNum, Integer pageSize) { | |||
| if (null == wxPark) wxPark = new WxPark(); | |||
| final PageInfo<WxPark> page = wxParkService.listAsPage(wxPark, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxPark wxPark) { | |||
| //Assert.notNull(wxPark.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxParkService.saveOrUpdate(wxPark); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxPark wxPark) { | |||
| wxParkService.saveOrUpdate(wxPark); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxParkService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxParkService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreHistory; | |||
| import com.simple.service.WxScoreHistoryService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreHistory") | |||
| public class WxScoreHistoryController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreHistoryService wxScoreHistoryService; | |||
| private Logger logger = Logger.getLogger(WxScoreHistoryController.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 WxScoreHistory wxScoreHistory,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreHistory) wxScoreHistory = new WxScoreHistory(); | |||
| final PageInfo<WxScoreHistory> page = wxScoreHistoryService.listAsPage(wxScoreHistory, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| //Assert.notNull(wxScoreHistory.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreHistoryService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreHistoryService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreRules; | |||
| import com.simple.service.WxScoreRulesService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreRules") | |||
| public class WxScoreRulesController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreRulesService wxScoreRulesService; | |||
| private Logger logger = Logger.getLogger(WxScoreRulesController.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 WxScoreRules wxScoreRules,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreRules) wxScoreRules = new WxScoreRules(); | |||
| final PageInfo<WxScoreRules> page = wxScoreRulesService.listAsPage(wxScoreRules, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreRules wxScoreRules) { | |||
| //Assert.notNull(wxScoreRules.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreRulesService.saveOrUpdate(wxScoreRules); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreRules wxScoreRules) { | |||
| wxScoreRulesService.saveOrUpdate(wxScoreRules); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreRulesService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreRulesService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreValidityPeriod; | |||
| import com.simple.service.WxScoreValidityPeriodService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreValidityPeriod") | |||
| public class WxScoreValidityPeriodController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreValidityPeriodService wxScoreValidityPeriodService; | |||
| private Logger logger = Logger.getLogger(WxScoreValidityPeriodController.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 WxScoreValidityPeriod wxScoreValidityPeriod,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreValidityPeriod) wxScoreValidityPeriod = new WxScoreValidityPeriod(); | |||
| final PageInfo<WxScoreValidityPeriod> page = wxScoreValidityPeriodService.listAsPage(wxScoreValidityPeriod, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreValidityPeriod wxScoreValidityPeriod) { | |||
| //Assert.notNull(wxScoreValidityPeriod.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreValidityPeriodService.saveOrUpdate(wxScoreValidityPeriod); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreValidityPeriod wxScoreValidityPeriod) { | |||
| wxScoreValidityPeriodService.saveOrUpdate(wxScoreValidityPeriod); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreValidityPeriodService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreValidityPeriodService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxShop; | |||
| import com.simple.service.WxShopService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxShop") | |||
| public class WxShopController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxShopService wxShopService; | |||
| private Logger logger = Logger.getLogger(WxShopController.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 WxShop wxShop,Integer pageNum, Integer pageSize) { | |||
| if (null == wxShop) wxShop = new WxShop(); | |||
| final PageInfo<WxShop> page = wxShopService.listAsPage(wxShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxShop wxShop) { | |||
| //Assert.notNull(wxShop.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxShopService.saveOrUpdate(wxShop); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxShop wxShop) { | |||
| wxShopService.saveOrUpdate(wxShop); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxShopService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxShopService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxTags; | |||
| import com.simple.service.WxTagsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxTags") | |||
| public class WxTagsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxTagsService wxTagsService; | |||
| private Logger logger = Logger.getLogger(WxTagsController.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 WxTags wxTags,Integer pageNum, Integer pageSize) { | |||
| if (null == wxTags) wxTags = new WxTags(); | |||
| final PageInfo<WxTags> page = wxTagsService.listAsPage(wxTags, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxTags wxTags) { | |||
| //Assert.notNull(wxTags.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxTagsService.saveOrUpdate(wxTags); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxTags wxTags) { | |||
| wxTagsService.saveOrUpdate(wxTags); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxTagsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxTagsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxWebLog; | |||
| import com.simple.service.WxWebLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxWebLog") | |||
| public class WxWebLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxWebLogService wxWebLogService; | |||
| private Logger logger = Logger.getLogger(WxWebLogController.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 WxWebLog wxWebLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxWebLog) wxWebLog = new WxWebLog(); | |||
| final PageInfo<WxWebLog> page = wxWebLogService.listAsPage(wxWebLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxWebLog wxWebLog) { | |||
| //Assert.notNull(wxWebLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxWebLogService.saveOrUpdate(wxWebLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxWebLog wxWebLog) { | |||
| wxWebLogService.saveOrUpdate(wxWebLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxWebLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxWebLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,40 @@ | |||
| spring: | |||
| # JDBC | |||
| datasource: | |||
| url: jdbc:mysql://47.100.34.187:63306/mallink?characterEncoding=UTF-8&useSSL=false | |||
| username: root | |||
| password: 1234qwer | |||
| type: com.alibaba.druid.pool.DruidDataSource | |||
| driver-class-name: com.mysql.jdbc.Driver | |||
| filters: stat | |||
| maxActive: 20 | |||
| initialSize: 1 | |||
| maxWait: 60000 | |||
| minIdle: 1 | |||
| timeBetweenEvictionRunsMillis: 60000 | |||
| minEvictableIdleTimeMillis: 300000 | |||
| validationQuery: select 'x' | |||
| testWhileIdle: true | |||
| testOnBorrow: false | |||
| testOnReturn: false | |||
| poolPreparedStatements: true | |||
| maxOpenPreparedStatements: 20 | |||
| jackson: | |||
| date-format: yyyy-MM-dd HH:mm:ss | |||
| # REDIS | |||
| redis: | |||
| host: 47.100.34.187 | |||
| port: 6379 | |||
| timeout: 0 | |||
| expire: 1800 #30分钟 | |||
| pool: | |||
| max-active: 8 | |||
| max-idle: 8 | |||
| max-wait: -1 | |||
| min-idle: 0 | |||
| logging: | |||
| level: | |||
| tk.mybatis: debug | |||
| com.simple.mapper: debug | |||
| @@ -0,0 +1,36 @@ | |||
| spring: | |||
| # JDBC | |||
| datasource: | |||
| url: jdbc:mysql://127.0.0.1:3306/mallink?characterEncoding=UTF-8 | |||
| username: root | |||
| password: 1234qwer | |||
| type: com.alibaba.druid.pool.DruidDataSource | |||
| driver-class-name: com.mysql.jdbc.Driver | |||
| filters: stat | |||
| maxActive: 20 | |||
| initialSize: 1 | |||
| maxWait: 60000 | |||
| minIdle: 1 | |||
| timeBetweenEvictionRunsMillis: 60000 | |||
| minEvictableIdleTimeMillis: 300000 | |||
| validationQuery: select 'x' | |||
| testWhileIdle: true | |||
| testOnBorrow: false | |||
| testOnReturn: false | |||
| poolPreparedStatements: true | |||
| maxOpenPreparedStatements: 20 | |||
| # REDIS | |||
| redis: | |||
| host: 127.0.0.1 | |||
| port: 6379 | |||
| timeout: 0 | |||
| pool: | |||
| max-active: 8 | |||
| max-idle: 8 | |||
| max-wait: -1 | |||
| min-idle: 0 | |||
| logging: | |||
| level: | |||
| tk.mybatis: error | |||
| com.simple.mapper: error | |||
| @@ -0,0 +1,39 @@ | |||
| server: | |||
| port: 9000 | |||
| context-path: / | |||
| spring: | |||
| application: | |||
| name: mallink | |||
| profiles: | |||
| active: dev | |||
| jackson: | |||
| date-format: yyyy-MM-dd HH:mm:ss | |||
| time-zone: GMT+8 | |||
| # @{link} https://github.com/abel533 | |||
| #Mybatis | |||
| mybatis: | |||
| type-aliases-package: com.simple.domain.po | |||
| mapper-locations: classpath:mapper/*Mapper.xml | |||
| configuration: | |||
| map-underscore-to-camel-case: true | |||
| cache-enabled: true | |||
| lazy-loading-enabled: true | |||
| use-generated-keys: true | |||
| default-fetch-size: 100 | |||
| #PageHelper | |||
| pagehelper: | |||
| helperDialect: mysql | |||
| reasonable: false | |||
| supportMethodsArguments: true | |||
| params: count=countSql | |||
| offset-as-page-num: true | |||
| page-size-zero: true | |||
| row-bounds-with-count: true | |||
| mapper: | |||
| mappers: | |||
| - com.simple.common.crud.CommonMapper | |||
| @@ -0,0 +1,35 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
| <modelVersion>4.0.0</modelVersion> | |||
| <parent> | |||
| <artifactId>mallink</artifactId> | |||
| <groupId>com.simple</groupId> | |||
| <version>1.0</version> | |||
| </parent> | |||
| <artifactId>mallinkApi</artifactId> | |||
| <dependencies> | |||
| <dependency> | |||
| <groupId>com.simple</groupId> | |||
| <artifactId>mallinkService</artifactId> | |||
| <version>1.0</version> | |||
| </dependency> | |||
| </dependencies> | |||
| <build> | |||
| <plugins> | |||
| <plugin> | |||
| <groupId>org.springframework.boot</groupId> | |||
| <artifactId>spring-boot-maven-plugin</artifactId> | |||
| <configuration> | |||
| <executable>true</executable> | |||
| </configuration> | |||
| </plugin> | |||
| </plugins> | |||
| </build> | |||
| </project> | |||
| @@ -0,0 +1,21 @@ | |||
| package com.simple; | |||
| import org.mybatis.spring.annotation.MapperScan; | |||
| import org.springframework.boot.SpringApplication; | |||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |||
| import springfox.documentation.swagger2.annotations.EnableSwagger2; | |||
| /** | |||
| * @author chenkx | |||
| * @date 2017-12-26 | |||
| */ | |||
| @SpringBootApplication | |||
| @MapperScan(basePackages = {"com.simple.mapper"}) | |||
| @EnableSwagger2 | |||
| public class UserApplication { | |||
| public static void main(String[] args) { | |||
| SpringApplication.run(UserApplication.class, args); | |||
| } | |||
| } | |||
| @@ -0,0 +1,35 @@ | |||
| package com.simple.controller; | |||
| import java.beans.PropertyEditorSupport; | |||
| import java.text.ParseException; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.Date; | |||
| import org.springframework.web.bind.WebDataBinder; | |||
| import org.springframework.web.bind.annotation.InitBinder; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| @RestController | |||
| public class BaseController { | |||
| @InitBinder | |||
| public void InitBinder(WebDataBinder dataBinder) { | |||
| dataBinder.registerCustomEditor(Date.class, new PropertyEditorSupport() { | |||
| public void setAsText(String value) { | |||
| try { | |||
| setValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(value)); | |||
| } catch(ParseException e) { | |||
| try { | |||
| setValue(new SimpleDateFormat("yyyy-MM-dd ").parse(value)); | |||
| } catch (ParseException e1) { | |||
| setValue(null); | |||
| } | |||
| } | |||
| } | |||
| public String getAsText() { | |||
| return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date) getValue()); | |||
| } | |||
| }); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxAppinfo; | |||
| import com.simple.service.WxAppinfoService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxAppinfo") | |||
| public class WxAppinfoController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxAppinfoService wxAppinfoService; | |||
| private Logger logger = Logger.getLogger(WxAppinfoController.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 WxAppinfo wxAppinfo,Integer pageNum, Integer pageSize) { | |||
| if (null == wxAppinfo) wxAppinfo = new WxAppinfo(); | |||
| final PageInfo<WxAppinfo> page = wxAppinfoService.listAsPage(wxAppinfo, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxAppinfo wxAppinfo) { | |||
| //Assert.notNull(wxAppinfo.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxAppinfoService.saveOrUpdate(wxAppinfo); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxAppinfo wxAppinfo) { | |||
| wxAppinfoService.saveOrUpdate(wxAppinfo); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxAppinfoService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxAppinfoService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBLog; | |||
| import com.simple.service.WxBLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBLog") | |||
| public class WxBLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBLogService wxBLogService; | |||
| private Logger logger = Logger.getLogger(WxBLogController.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 WxBLog wxBLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBLog) wxBLog = new WxBLog(); | |||
| final PageInfo<WxBLog> page = wxBLogService.listAsPage(wxBLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBLog wxBLog) { | |||
| //Assert.notNull(wxBLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBLog wxBLog) { | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBUserMerchant; | |||
| import com.simple.service.WxBUserMerchantService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBUserMerchant") | |||
| public class WxBUserMerchantController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBUserMerchantService wxBUserMerchantService; | |||
| private Logger logger = Logger.getLogger(WxBUserMerchantController.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 WxBUserMerchant wxBUserMerchant,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBUserMerchant) wxBUserMerchant = new WxBUserMerchant(); | |||
| final PageInfo<WxBUserMerchant> page = wxBUserMerchantService.listAsPage(wxBUserMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBUserMerchant wxBUserMerchant) { | |||
| //Assert.notNull(wxBUserMerchant.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBUserMerchantService.saveOrUpdate(wxBUserMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBUserMerchant wxBUserMerchant) { | |||
| wxBUserMerchantService.saveOrUpdate(wxBUserMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBUserMerchantService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBUserMerchantService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBanners; | |||
| import com.simple.service.WxBannersService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBanners") | |||
| public class WxBannersController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBannersService wxBannersService; | |||
| private Logger logger = Logger.getLogger(WxBannersController.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 WxBanners wxBanners,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBanners) wxBanners = new WxBanners(); | |||
| final PageInfo<WxBanners> page = wxBannersService.listAsPage(wxBanners, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBanners wxBanners) { | |||
| //Assert.notNull(wxBanners.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBannersService.saveOrUpdate(wxBanners); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBanners wxBanners) { | |||
| wxBannersService.saveOrUpdate(wxBanners); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBannersService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBannersService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxBusiness; | |||
| import com.simple.service.WxBusinessService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxBusiness") | |||
| public class WxBusinessController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxBusinessService wxBusinessService; | |||
| private Logger logger = Logger.getLogger(WxBusinessController.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 WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | |||
| if (null == wxBusiness) wxBusiness = new WxBusiness(); | |||
| final PageInfo<WxBusiness> page = wxBusinessService.listAsPage(wxBusiness, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBusiness wxBusiness) { | |||
| //Assert.notNull(wxBusiness.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBusinessService.saveOrUpdate(wxBusiness); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBusiness wxBusiness) { | |||
| wxBusinessService.saveOrUpdate(wxBusiness); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxBusinessService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxBusinessService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCLog; | |||
| import com.simple.service.WxCLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCLog") | |||
| public class WxCLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCLogService wxCLogService; | |||
| private Logger logger = Logger.getLogger(WxCLogController.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 WxCLog wxCLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCLog) wxCLog = new WxCLog(); | |||
| final PageInfo<WxCLog> page = wxCLogService.listAsPage(wxCLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCLog wxCLog) { | |||
| //Assert.notNull(wxCLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCLogService.saveOrUpdate(wxCLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCLog wxCLog) { | |||
| wxCLogService.saveOrUpdate(wxCLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserCars; | |||
| import com.simple.service.WxCUserCarsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserCars") | |||
| public class WxCUserCarsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserCarsService wxCUserCarsService; | |||
| private Logger logger = Logger.getLogger(WxCUserCarsController.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 WxCUserCars wxCUserCars,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserCars) wxCUserCars = new WxCUserCars(); | |||
| final PageInfo<WxCUserCars> page = wxCUserCarsService.listAsPage(wxCUserCars, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserCars wxCUserCars) { | |||
| //Assert.notNull(wxCUserCars.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserCarsService.saveOrUpdate(wxCUserCars); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserCars wxCUserCars) { | |||
| wxCUserCarsService.saveOrUpdate(wxCUserCars); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserCarsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserCloud; | |||
| import com.simple.service.WxCUserCloudService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserCloud") | |||
| public class WxCUserCloudController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserCloudService wxCUserCloudService; | |||
| private Logger logger = Logger.getLogger(WxCUserCloudController.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 WxCUserCloud wxCUserCloud,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserCloud) wxCUserCloud = new WxCUserCloud(); | |||
| final PageInfo<WxCUserCloud> page = wxCUserCloudService.listAsPage(wxCUserCloud, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserCloud wxCUserCloud) { | |||
| //Assert.notNull(wxCUserCloud.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserCloudService.saveOrUpdate(wxCUserCloud); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserCloud wxCUserCloud) { | |||
| wxCUserCloudService.saveOrUpdate(wxCUserCloud); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserCloudService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserCloudService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUser; | |||
| import com.simple.service.WxCUserService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUser") | |||
| public class WxCUserController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserService wxCUserService; | |||
| private Logger logger = Logger.getLogger(WxCUserController.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 WxCUser wxCUser,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUser) wxCUser = new WxCUser(); | |||
| final PageInfo<WxCUser> page = wxCUserService.listAsPage(wxCUser, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUser wxCUser) { | |||
| //Assert.notNull(wxCUser.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserService.saveOrUpdate(wxCUser); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUser wxCUser) { | |||
| wxCUserService.saveOrUpdate(wxCUser); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCUserTags; | |||
| import com.simple.service.WxCUserTagsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCUserTags") | |||
| public class WxCUserTagsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCUserTagsService wxCUserTagsService; | |||
| private Logger logger = Logger.getLogger(WxCUserTagsController.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 WxCUserTags wxCUserTags,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCUserTags) wxCUserTags = new WxCUserTags(); | |||
| final PageInfo<WxCUserTags> page = wxCUserTagsService.listAsPage(wxCUserTags, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCUserTags wxCUserTags) { | |||
| //Assert.notNull(wxCUserTags.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCUserTagsService.saveOrUpdate(wxCUserTags); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCUserTags wxCUserTags) { | |||
| wxCUserTagsService.saveOrUpdate(wxCUserTags); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCUserTagsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCUserTagsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponActionLog; | |||
| import com.simple.service.WxCouponActionLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponActionLog") | |||
| public class WxCouponActionLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponActionLogService wxCouponActionLogService; | |||
| private Logger logger = Logger.getLogger(WxCouponActionLogController.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 WxCouponActionLog wxCouponActionLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponActionLog) wxCouponActionLog = new WxCouponActionLog(); | |||
| final PageInfo<WxCouponActionLog> page = wxCouponActionLogService.listAsPage(wxCouponActionLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| //Assert.notNull(wxCouponActionLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponActionLogService.saveOrUpdate(wxCouponActionLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponActionLog wxCouponActionLog) { | |||
| wxCouponActionLogService.saveOrUpdate(wxCouponActionLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponActionLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponActionLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponActivity; | |||
| import com.simple.service.WxCouponActivityService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponActivity") | |||
| public class WxCouponActivityController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponActivityService wxCouponActivityService; | |||
| private Logger logger = Logger.getLogger(WxCouponActivityController.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 WxCouponActivity wxCouponActivity,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponActivity) wxCouponActivity = new WxCouponActivity(); | |||
| final PageInfo<WxCouponActivity> page = wxCouponActivityService.listAsPage(wxCouponActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponActivity wxCouponActivity) { | |||
| //Assert.notNull(wxCouponActivity.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponActivityService.saveOrUpdate(wxCouponActivity); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponActivity wxCouponActivity) { | |||
| wxCouponActivityService.saveOrUpdate(wxCouponActivity); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponActivityService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponActivityService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCoupon; | |||
| import com.simple.service.WxCouponService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCoupon") | |||
| public class WxCouponController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| private Logger logger = Logger.getLogger(WxCouponController.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 WxCoupon wxCoupon,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCoupon) wxCoupon = new WxCoupon(); | |||
| final PageInfo<WxCoupon> page = wxCouponService.listAsPage(wxCoupon, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCoupon wxCoupon) { | |||
| //Assert.notNull(wxCoupon.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponService.saveOrUpdate(wxCoupon); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCoupon wxCoupon) { | |||
| wxCouponService.saveOrUpdate(wxCoupon); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponRecord; | |||
| import com.simple.service.WxCouponRecordService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponRecord") | |||
| public class WxCouponRecordController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponRecordService wxCouponRecordService; | |||
| private Logger logger = Logger.getLogger(WxCouponRecordController.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 WxCouponRecord wxCouponRecord,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponRecord) wxCouponRecord = new WxCouponRecord(); | |||
| final PageInfo<WxCouponRecord> page = wxCouponRecordService.listAsPage(wxCouponRecord, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponRecord wxCouponRecord) { | |||
| //Assert.notNull(wxCouponRecord.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponRecordService.saveOrUpdate(wxCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponRecord wxCouponRecord) { | |||
| wxCouponRecordService.saveOrUpdate(wxCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponRecordService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponRecordService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxCouponType; | |||
| import com.simple.service.WxCouponTypeService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxCouponType") | |||
| public class WxCouponTypeController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxCouponTypeService wxCouponTypeService; | |||
| private Logger logger = Logger.getLogger(WxCouponTypeController.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 WxCouponType wxCouponType,Integer pageNum, Integer pageSize) { | |||
| if (null == wxCouponType) wxCouponType = new WxCouponType(); | |||
| final PageInfo<WxCouponType> page = wxCouponTypeService.listAsPage(wxCouponType, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxCouponType wxCouponType) { | |||
| //Assert.notNull(wxCouponType.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxCouponTypeService.saveOrUpdate(wxCouponType); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxCouponType wxCouponType) { | |||
| wxCouponTypeService.saveOrUpdate(wxCouponType); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxCouponTypeService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxCouponTypeService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpCouponRecord; | |||
| import com.simple.service.WxEtcpCouponRecordService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpCouponRecord") | |||
| public class WxEtcpCouponRecordController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpCouponRecordService wxEtcpCouponRecordService; | |||
| private Logger logger = Logger.getLogger(WxEtcpCouponRecordController.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 WxEtcpCouponRecord wxEtcpCouponRecord,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpCouponRecord) wxEtcpCouponRecord = new WxEtcpCouponRecord(); | |||
| final PageInfo<WxEtcpCouponRecord> page = wxEtcpCouponRecordService.listAsPage(wxEtcpCouponRecord, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpCouponRecord wxEtcpCouponRecord) { | |||
| //Assert.notNull(wxEtcpCouponRecord.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpCouponRecordService.saveOrUpdate(wxEtcpCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpCouponRecord wxEtcpCouponRecord) { | |||
| wxEtcpCouponRecordService.saveOrUpdate(wxEtcpCouponRecord); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpCouponRecordService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpCouponRecordService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkDissolution; | |||
| import com.simple.service.WxEtcpParkDissolutionService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkDissolution") | |||
| public class WxEtcpParkDissolutionController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkDissolutionService wxEtcpParkDissolutionService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkDissolutionController.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 WxEtcpParkDissolution wxEtcpParkDissolution,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkDissolution) wxEtcpParkDissolution = new WxEtcpParkDissolution(); | |||
| final PageInfo<WxEtcpParkDissolution> page = wxEtcpParkDissolutionService.listAsPage(wxEtcpParkDissolution, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkDissolution wxEtcpParkDissolution) { | |||
| //Assert.notNull(wxEtcpParkDissolution.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkDissolutionService.saveOrUpdate(wxEtcpParkDissolution); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkDissolution wxEtcpParkDissolution) { | |||
| wxEtcpParkDissolutionService.saveOrUpdate(wxEtcpParkDissolution); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkDissolutionService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkDissolutionService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkIn; | |||
| import com.simple.service.WxEtcpParkInService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkIn") | |||
| public class WxEtcpParkInController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkInService wxEtcpParkInService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkInController.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 WxEtcpParkIn wxEtcpParkIn,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkIn) wxEtcpParkIn = new WxEtcpParkIn(); | |||
| final PageInfo<WxEtcpParkIn> page = wxEtcpParkInService.listAsPage(wxEtcpParkIn, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkIn wxEtcpParkIn) { | |||
| //Assert.notNull(wxEtcpParkIn.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkInService.saveOrUpdate(wxEtcpParkIn); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkIn wxEtcpParkIn) { | |||
| wxEtcpParkInService.saveOrUpdate(wxEtcpParkIn); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkInService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkInService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkMsgSuc; | |||
| import com.simple.service.WxEtcpParkMsgSucService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkMsgSuc") | |||
| public class WxEtcpParkMsgSucController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkMsgSucService wxEtcpParkMsgSucService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkMsgSucController.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 WxEtcpParkMsgSuc wxEtcpParkMsgSuc,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkMsgSuc) wxEtcpParkMsgSuc = new WxEtcpParkMsgSuc(); | |||
| final PageInfo<WxEtcpParkMsgSuc> page = wxEtcpParkMsgSucService.listAsPage(wxEtcpParkMsgSuc, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkMsgSuc wxEtcpParkMsgSuc) { | |||
| //Assert.notNull(wxEtcpParkMsgSuc.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkMsgSucService.saveOrUpdate(wxEtcpParkMsgSuc); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkMsgSuc wxEtcpParkMsgSuc) { | |||
| wxEtcpParkMsgSucService.saveOrUpdate(wxEtcpParkMsgSuc); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkMsgSucService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkMsgSucService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkOrderunpay; | |||
| import com.simple.service.WxEtcpParkOrderunpayService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkOrderunpay") | |||
| public class WxEtcpParkOrderunpayController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkOrderunpayService wxEtcpParkOrderunpayService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkOrderunpayController.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 WxEtcpParkOrderunpay wxEtcpParkOrderunpay,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkOrderunpay) wxEtcpParkOrderunpay = new WxEtcpParkOrderunpay(); | |||
| final PageInfo<WxEtcpParkOrderunpay> page = wxEtcpParkOrderunpayService.listAsPage(wxEtcpParkOrderunpay, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkOrderunpay wxEtcpParkOrderunpay) { | |||
| //Assert.notNull(wxEtcpParkOrderunpay.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkOrderunpayService.saveOrUpdate(wxEtcpParkOrderunpay); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkOrderunpay wxEtcpParkOrderunpay) { | |||
| wxEtcpParkOrderunpayService.saveOrUpdate(wxEtcpParkOrderunpay); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkOrderunpayService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkOrderunpayService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkOut; | |||
| import com.simple.service.WxEtcpParkOutService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkOut") | |||
| public class WxEtcpParkOutController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkOutService wxEtcpParkOutService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkOutController.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 WxEtcpParkOut wxEtcpParkOut,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkOut) wxEtcpParkOut = new WxEtcpParkOut(); | |||
| final PageInfo<WxEtcpParkOut> page = wxEtcpParkOutService.listAsPage(wxEtcpParkOut, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkOut wxEtcpParkOut) { | |||
| //Assert.notNull(wxEtcpParkOut.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkOutService.saveOrUpdate(wxEtcpParkOut); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkOut wxEtcpParkOut) { | |||
| wxEtcpParkOutService.saveOrUpdate(wxEtcpParkOut); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkOutService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkOutService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkTransaction; | |||
| import com.simple.service.WxEtcpParkTransactionService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkTransaction") | |||
| public class WxEtcpParkTransactionController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkTransactionService wxEtcpParkTransactionService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkTransactionController.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 WxEtcpParkTransaction wxEtcpParkTransaction,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkTransaction) wxEtcpParkTransaction = new WxEtcpParkTransaction(); | |||
| final PageInfo<WxEtcpParkTransaction> page = wxEtcpParkTransactionService.listAsPage(wxEtcpParkTransaction, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkTransaction wxEtcpParkTransaction) { | |||
| //Assert.notNull(wxEtcpParkTransaction.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkTransactionService.saveOrUpdate(wxEtcpParkTransaction); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkTransaction wxEtcpParkTransaction) { | |||
| wxEtcpParkTransactionService.saveOrUpdate(wxEtcpParkTransaction); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkTransactionService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkTransactionService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxEtcpParkUnbind; | |||
| import com.simple.service.WxEtcpParkUnbindService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxEtcpParkUnbind") | |||
| public class WxEtcpParkUnbindController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxEtcpParkUnbindService wxEtcpParkUnbindService; | |||
| private Logger logger = Logger.getLogger(WxEtcpParkUnbindController.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 WxEtcpParkUnbind wxEtcpParkUnbind,Integer pageNum, Integer pageSize) { | |||
| if (null == wxEtcpParkUnbind) wxEtcpParkUnbind = new WxEtcpParkUnbind(); | |||
| final PageInfo<WxEtcpParkUnbind> page = wxEtcpParkUnbindService.listAsPage(wxEtcpParkUnbind, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxEtcpParkUnbind wxEtcpParkUnbind) { | |||
| //Assert.notNull(wxEtcpParkUnbind.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxEtcpParkUnbindService.saveOrUpdate(wxEtcpParkUnbind); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxEtcpParkUnbind wxEtcpParkUnbind) { | |||
| wxEtcpParkUnbindService.saveOrUpdate(wxEtcpParkUnbind); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxEtcpParkUnbindService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxEtcpParkUnbindService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxFlashSale; | |||
| import com.simple.service.WxFlashSaleService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxFlashSale") | |||
| public class WxFlashSaleController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxFlashSaleService wxFlashSaleService; | |||
| private Logger logger = Logger.getLogger(WxFlashSaleController.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 WxFlashSale wxFlashSale,Integer pageNum, Integer pageSize) { | |||
| if (null == wxFlashSale) wxFlashSale = new WxFlashSale(); | |||
| final PageInfo<WxFlashSale> page = wxFlashSaleService.listAsPage(wxFlashSale, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxFlashSale wxFlashSale) { | |||
| //Assert.notNull(wxFlashSale.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxFlashSaleService.saveOrUpdate(wxFlashSale); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxFlashSale wxFlashSale) { | |||
| wxFlashSaleService.saveOrUpdate(wxFlashSale); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxFlashSaleService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxFlashSaleService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMallBuilding; | |||
| import com.simple.service.WxMallBuildingService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMallBuilding") | |||
| public class WxMallBuildingController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallBuildingService wxMallBuildingService; | |||
| private Logger logger = Logger.getLogger(WxMallBuildingController.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 WxMallBuilding wxMallBuilding,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMallBuilding) wxMallBuilding = new WxMallBuilding(); | |||
| final PageInfo<WxMallBuilding> page = wxMallBuildingService.listAsPage(wxMallBuilding, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| //Assert.notNull(wxMallBuilding.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMallBuilding wxMallBuilding) { | |||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallBuildingService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallBuildingService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMall; | |||
| import com.simple.service.WxMallService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMall") | |||
| public class WxMallController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallService wxMallService; | |||
| private Logger logger = Logger.getLogger(WxMallController.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 WxMall wxMall,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMall) wxMall = new WxMall(); | |||
| final PageInfo<WxMall> page = wxMallService.listAsPage(wxMall, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMall wxMall) { | |||
| //Assert.notNull(wxMall.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallService.saveOrUpdate(wxMall); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMall wxMall) { | |||
| wxMallService.saveOrUpdate(wxMall); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMallFloor; | |||
| import com.simple.service.WxMallFloorService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMallFloor") | |||
| public class WxMallFloorController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMallFloorService wxMallFloorService; | |||
| private Logger logger = Logger.getLogger(WxMallFloorController.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 WxMallFloor wxMallFloor,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMallFloor) wxMallFloor = new WxMallFloor(); | |||
| final PageInfo<WxMallFloor> page = wxMallFloorService.listAsPage(wxMallFloor, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMallFloor wxMallFloor) { | |||
| //Assert.notNull(wxMallFloor.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMallFloor wxMallFloor) { | |||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMallFloorService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMallFloorService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchant; | |||
| import com.simple.service.WxMerchantService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchant") | |||
| public class WxMerchantController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantService wxMerchantService; | |||
| private Logger logger = Logger.getLogger(WxMerchantController.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 WxMerchant wxMerchant,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchant wxMerchant) { | |||
| //Assert.notNull(wxMerchant.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantService.saveOrUpdate(wxMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchant wxMerchant) { | |||
| wxMerchantService.saveOrUpdate(wxMerchant); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchantShop; | |||
| import com.simple.service.WxMerchantShopService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchantShop") | |||
| public class WxMerchantShopController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantShopService wxMerchantShopService; | |||
| private Logger logger = Logger.getLogger(WxMerchantShopController.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 WxMerchantShop wxMerchantShop,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchantShop) wxMerchantShop = new WxMerchantShop(); | |||
| final PageInfo<WxMerchantShop> page = wxMerchantShopService.listAsPage(wxMerchantShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchantShop wxMerchantShop) { | |||
| //Assert.notNull(wxMerchantShop.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantShopService.saveOrUpdate(wxMerchantShop); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchantShop wxMerchantShop) { | |||
| wxMerchantShopService.saveOrUpdate(wxMerchantShop); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantShopService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantShopService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMerchantTradeDays; | |||
| import com.simple.service.WxMerchantTradeDaysService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMerchantTradeDays") | |||
| public class WxMerchantTradeDaysController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMerchantTradeDaysService wxMerchantTradeDaysService; | |||
| private Logger logger = Logger.getLogger(WxMerchantTradeDaysController.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 WxMerchantTradeDays wxMerchantTradeDays,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMerchantTradeDays) wxMerchantTradeDays = new WxMerchantTradeDays(); | |||
| final PageInfo<WxMerchantTradeDays> page = wxMerchantTradeDaysService.listAsPage(wxMerchantTradeDays, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMerchantTradeDays wxMerchantTradeDays) { | |||
| //Assert.notNull(wxMerchantTradeDays.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMerchantTradeDaysService.saveOrUpdate(wxMerchantTradeDays); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMerchantTradeDays wxMerchantTradeDays) { | |||
| wxMerchantTradeDaysService.saveOrUpdate(wxMerchantTradeDays); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMerchantTradeDaysService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMerchantTradeDaysService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsg; | |||
| import com.simple.service.WxMsgService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsg") | |||
| public class WxMsgController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgService wxMsgService; | |||
| private Logger logger = Logger.getLogger(WxMsgController.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 WxMsg wxMsg,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsg) wxMsg = new WxMsg(); | |||
| final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsg wxMsg) { | |||
| //Assert.notNull(wxMsg.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgService.saveOrUpdate(wxMsg); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsg wxMsg) { | |||
| wxMsgService.saveOrUpdate(wxMsg); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsgModel; | |||
| import com.simple.service.WxMsgModelService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsgModel") | |||
| public class WxMsgModelController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgModelService wxMsgModelService; | |||
| private Logger logger = Logger.getLogger(WxMsgModelController.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 WxMsgModel wxMsgModel,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsgModel) wxMsgModel = new WxMsgModel(); | |||
| final PageInfo<WxMsgModel> page = wxMsgModelService.listAsPage(wxMsgModel, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsgModel wxMsgModel) { | |||
| //Assert.notNull(wxMsgModel.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgModelService.saveOrUpdate(wxMsgModel); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsgModel wxMsgModel) { | |||
| wxMsgModelService.saveOrUpdate(wxMsgModel); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgModelService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgModelService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxMsgSignature; | |||
| import com.simple.service.WxMsgSignatureService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxMsgSignature") | |||
| public class WxMsgSignatureController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxMsgSignatureService wxMsgSignatureService; | |||
| private Logger logger = Logger.getLogger(WxMsgSignatureController.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 WxMsgSignature wxMsgSignature,Integer pageNum, Integer pageSize) { | |||
| if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | |||
| final PageInfo<WxMsgSignature> page = wxMsgSignatureService.listAsPage(wxMsgSignature, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| //Assert.notNull(wxMsgSignature.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxMsgSignature wxMsgSignature) { | |||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxMsgSignatureService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxMsgSignatureService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxOrders; | |||
| import com.simple.service.WxOrdersService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxOrders") | |||
| public class WxOrdersController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxOrdersService wxOrdersService; | |||
| private Logger logger = Logger.getLogger(WxOrdersController.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 WxOrders wxOrders,Integer pageNum, Integer pageSize) { | |||
| if (null == wxOrders) wxOrders = new WxOrders(); | |||
| final PageInfo<WxOrders> page = wxOrdersService.listAsPage(wxOrders, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxOrders wxOrders) { | |||
| //Assert.notNull(wxOrders.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxOrdersService.saveOrUpdate(wxOrders); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxOrders wxOrders) { | |||
| wxOrdersService.saveOrUpdate(wxOrders); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxOrdersService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxOrdersService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxPark; | |||
| import com.simple.service.WxParkService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxPark") | |||
| public class WxParkController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxParkService wxParkService; | |||
| private Logger logger = Logger.getLogger(WxParkController.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 WxPark wxPark,Integer pageNum, Integer pageSize) { | |||
| if (null == wxPark) wxPark = new WxPark(); | |||
| final PageInfo<WxPark> page = wxParkService.listAsPage(wxPark, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxPark wxPark) { | |||
| //Assert.notNull(wxPark.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxParkService.saveOrUpdate(wxPark); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxPark wxPark) { | |||
| wxParkService.saveOrUpdate(wxPark); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxParkService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxParkService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreHistory; | |||
| import com.simple.service.WxScoreHistoryService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreHistory") | |||
| public class WxScoreHistoryController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreHistoryService wxScoreHistoryService; | |||
| private Logger logger = Logger.getLogger(WxScoreHistoryController.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 WxScoreHistory wxScoreHistory,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreHistory) wxScoreHistory = new WxScoreHistory(); | |||
| final PageInfo<WxScoreHistory> page = wxScoreHistoryService.listAsPage(wxScoreHistory, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| //Assert.notNull(wxScoreHistory.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreHistory wxScoreHistory) { | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreHistoryService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreHistoryService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreRules; | |||
| import com.simple.service.WxScoreRulesService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreRules") | |||
| public class WxScoreRulesController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreRulesService wxScoreRulesService; | |||
| private Logger logger = Logger.getLogger(WxScoreRulesController.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 WxScoreRules wxScoreRules,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreRules) wxScoreRules = new WxScoreRules(); | |||
| final PageInfo<WxScoreRules> page = wxScoreRulesService.listAsPage(wxScoreRules, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreRules wxScoreRules) { | |||
| //Assert.notNull(wxScoreRules.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreRulesService.saveOrUpdate(wxScoreRules); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreRules wxScoreRules) { | |||
| wxScoreRulesService.saveOrUpdate(wxScoreRules); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreRulesService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreRulesService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxScoreValidityPeriod; | |||
| import com.simple.service.WxScoreValidityPeriodService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxScoreValidityPeriod") | |||
| public class WxScoreValidityPeriodController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxScoreValidityPeriodService wxScoreValidityPeriodService; | |||
| private Logger logger = Logger.getLogger(WxScoreValidityPeriodController.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 WxScoreValidityPeriod wxScoreValidityPeriod,Integer pageNum, Integer pageSize) { | |||
| if (null == wxScoreValidityPeriod) wxScoreValidityPeriod = new WxScoreValidityPeriod(); | |||
| final PageInfo<WxScoreValidityPeriod> page = wxScoreValidityPeriodService.listAsPage(wxScoreValidityPeriod, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxScoreValidityPeriod wxScoreValidityPeriod) { | |||
| //Assert.notNull(wxScoreValidityPeriod.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxScoreValidityPeriodService.saveOrUpdate(wxScoreValidityPeriod); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxScoreValidityPeriod wxScoreValidityPeriod) { | |||
| wxScoreValidityPeriodService.saveOrUpdate(wxScoreValidityPeriod); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxScoreValidityPeriodService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxScoreValidityPeriodService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxShop; | |||
| import com.simple.service.WxShopService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxShop") | |||
| public class WxShopController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxShopService wxShopService; | |||
| private Logger logger = Logger.getLogger(WxShopController.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 WxShop wxShop,Integer pageNum, Integer pageSize) { | |||
| if (null == wxShop) wxShop = new WxShop(); | |||
| final PageInfo<WxShop> page = wxShopService.listAsPage(wxShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxShop wxShop) { | |||
| //Assert.notNull(wxShop.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxShopService.saveOrUpdate(wxShop); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxShop wxShop) { | |||
| wxShopService.saveOrUpdate(wxShop); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxShopService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxShopService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxTags; | |||
| import com.simple.service.WxTagsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxTags") | |||
| public class WxTagsController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxTagsService wxTagsService; | |||
| private Logger logger = Logger.getLogger(WxTagsController.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 WxTags wxTags,Integer pageNum, Integer pageSize) { | |||
| if (null == wxTags) wxTags = new WxTags(); | |||
| final PageInfo<WxTags> page = wxTagsService.listAsPage(wxTags, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxTags wxTags) { | |||
| //Assert.notNull(wxTags.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxTagsService.saveOrUpdate(wxTags); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxTags wxTags) { | |||
| wxTagsService.saveOrUpdate(wxTags); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxTagsService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxTagsService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,66 @@ | |||
| package com.simple.controller; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.util.Assert; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.simple.common.rest.Result; | |||
| import com.simple.common.rest.ResultData; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| import com.simple.domain.po.WxWebLog; | |||
| import com.simple.service.WxWebLogService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @RestController | |||
| @RequestMapping("wxWebLog") | |||
| public class WxWebLogController extends BaseController | |||
| { | |||
| @Autowired | |||
| private WxWebLogService wxWebLogService; | |||
| private Logger logger = Logger.getLogger(WxWebLogController.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 WxWebLog wxWebLog,Integer pageNum, Integer pageSize) { | |||
| if (null == wxWebLog) wxWebLog = new WxWebLog(); | |||
| final PageInfo<WxWebLog> page = wxWebLogService.listAsPage(wxWebLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxWebLog wxWebLog) { | |||
| //Assert.notNull(wxWebLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxWebLogService.saveOrUpdate(wxWebLog); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxWebLog wxWebLog) { | |||
| wxWebLogService.saveOrUpdate(wxWebLog); | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData delete(String id) { | |||
| wxWebLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name="id",value="id",dataType="String", paramType = "query",required=true) | |||
| public ResultData findById(String id) { | |||
| return new ResultData(Result.SUCCESS,"查询成功",wxWebLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,40 @@ | |||
| spring: | |||
| # JDBC | |||
| datasource: | |||
| url: jdbc:mysql://47.100.34.187:63306/mallink?characterEncoding=UTF-8&useSSL=false | |||
| username: root | |||
| password: 1234qwer | |||
| type: com.alibaba.druid.pool.DruidDataSource | |||
| driver-class-name: com.mysql.jdbc.Driver | |||
| filters: stat | |||
| maxActive: 20 | |||
| initialSize: 1 | |||
| maxWait: 60000 | |||
| minIdle: 1 | |||
| timeBetweenEvictionRunsMillis: 60000 | |||
| minEvictableIdleTimeMillis: 300000 | |||
| validationQuery: select 'x' | |||
| testWhileIdle: true | |||
| testOnBorrow: false | |||
| testOnReturn: false | |||
| poolPreparedStatements: true | |||
| maxOpenPreparedStatements: 20 | |||
| jackson: | |||
| date-format: yyyy-MM-dd HH:mm:ss | |||
| # REDIS | |||
| redis: | |||
| host: 47.100.34.187 | |||
| port: 6379 | |||
| timeout: 0 | |||
| expire: 1800 #30分钟 | |||
| pool: | |||
| max-active: 8 | |||
| max-idle: 8 | |||
| max-wait: -1 | |||
| min-idle: 0 | |||
| logging: | |||
| level: | |||
| tk.mybatis: debug | |||
| com.simple.mapper: debug | |||
| @@ -0,0 +1,36 @@ | |||
| spring: | |||
| # JDBC | |||
| datasource: | |||
| url: jdbc:mysql://127.0.0.1:3306/mallink?characterEncoding=UTF-8 | |||
| username: root | |||
| password: 1234qwer | |||
| type: com.alibaba.druid.pool.DruidDataSource | |||
| driver-class-name: com.mysql.jdbc.Driver | |||
| filters: stat | |||
| maxActive: 20 | |||
| initialSize: 1 | |||
| maxWait: 60000 | |||
| minIdle: 1 | |||
| timeBetweenEvictionRunsMillis: 60000 | |||
| minEvictableIdleTimeMillis: 300000 | |||
| validationQuery: select 'x' | |||
| testWhileIdle: true | |||
| testOnBorrow: false | |||
| testOnReturn: false | |||
| poolPreparedStatements: true | |||
| maxOpenPreparedStatements: 20 | |||
| # REDIS | |||
| redis: | |||
| host: 127.0.0.1 | |||
| port: 6379 | |||
| timeout: 0 | |||
| pool: | |||
| max-active: 8 | |||
| max-idle: 8 | |||
| max-wait: -1 | |||
| min-idle: 0 | |||
| logging: | |||
| level: | |||
| tk.mybatis: error | |||
| com.simple.mapper: error | |||
| @@ -0,0 +1,39 @@ | |||
| server: | |||
| port: 9000 | |||
| context-path: / | |||
| spring: | |||
| application: | |||
| name: mallink | |||
| profiles: | |||
| active: dev | |||
| jackson: | |||
| date-format: yyyy-MM-dd HH:mm:ss | |||
| time-zone: GMT+8 | |||
| # @{link} https://github.com/abel533 | |||
| #Mybatis | |||
| mybatis: | |||
| type-aliases-package: com.simple.domain.po | |||
| mapper-locations: classpath:mapper/*Mapper.xml | |||
| configuration: | |||
| map-underscore-to-camel-case: true | |||
| cache-enabled: true | |||
| lazy-loading-enabled: true | |||
| use-generated-keys: true | |||
| default-fetch-size: 100 | |||
| #PageHelper | |||
| pagehelper: | |||
| helperDialect: mysql | |||
| reasonable: false | |||
| supportMethodsArguments: true | |||
| params: count=countSql | |||
| offset-as-page-num: true | |||
| page-size-zero: true | |||
| row-bounds-with-count: true | |||
| mapper: | |||
| mappers: | |||
| - com.simple.common.crud.CommonMapper | |||
| @@ -0,0 +1,13 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
| <parent> | |||
| <artifactId>mallink</artifactId> | |||
| <groupId>com.simple</groupId> | |||
| <version>1.0</version> | |||
| </parent> | |||
| <modelVersion>4.0.0</modelVersion> | |||
| <artifactId>mallinkService</artifactId> | |||
| </project> | |||
| @@ -0,0 +1,152 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_appinfo") | |||
| public class WxAppinfo extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*小程序ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appid") | |||
| private String appid; | |||
| /*小程序secret**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序secret",name="secret") | |||
| private String secret; | |||
| /*小程序名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序名",name="name") | |||
| private String name; | |||
| /*消息token**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="消息token",name="token") | |||
| private String token; | |||
| /*消息aeskey**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="消息aeskey",name="aeskey") | |||
| private String aeskey; | |||
| /*微信访问token**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信访问token",name="accessToken") | |||
| private String accessToken; | |||
| /*上次生成accesstoken时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="上次生成accesstoken时间",name="lastTokenTime") | |||
| private Date lastTokenTime; | |||
| /*微信token有效时间单位(秒)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信token有效时间单位(秒)",name="expiresIn") | |||
| private Integer expiresIn; | |||
| public String getAppid() { | |||
| return appid; | |||
| } | |||
| public void setAppid(String _appid) { | |||
| appid = _appid; | |||
| } | |||
| public String getSecret() { | |||
| return secret; | |||
| } | |||
| public void setSecret(String _secret) { | |||
| secret = _secret; | |||
| } | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String _name) { | |||
| name = _name; | |||
| } | |||
| public String getToken() { | |||
| return token; | |||
| } | |||
| public void setToken(String _token) { | |||
| token = _token; | |||
| } | |||
| public String getAeskey() { | |||
| return aeskey; | |||
| } | |||
| public void setAeskey(String _aeskey) { | |||
| aeskey = _aeskey; | |||
| } | |||
| public String getAccessToken() { | |||
| return accessToken; | |||
| } | |||
| public void setAccessToken(String _accessToken) { | |||
| accessToken = _accessToken; | |||
| } | |||
| public Date getLastTokenTime() { | |||
| return lastTokenTime; | |||
| } | |||
| public void setLastTokenTime(Date _lastTokenTime) { | |||
| lastTokenTime = _lastTokenTime; | |||
| } | |||
| public Integer getExpiresIn() { | |||
| return expiresIn; | |||
| } | |||
| public void setExpiresIn(Integer _expiresIn) { | |||
| expiresIn = _expiresIn; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,Appid_ASC("`appid` ASC"),Appid_DESC("`appid` DESC") | |||
| ,Secret_ASC("`secret` ASC"),Secret_DESC("`secret` DESC") | |||
| ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") | |||
| ,Token_ASC("`token` ASC"),Token_DESC("`token` DESC") | |||
| ,Aeskey_ASC("`aeskey` ASC"),Aeskey_DESC("`aeskey` DESC") | |||
| ,AccessToken_ASC("`accessToken` ASC"),AccessToken_DESC("`accessToken` DESC") | |||
| ,LastTokenTime_ASC("`lastTokenTime` ASC"),LastTokenTime_DESC("`lastTokenTime` DESC") | |||
| ,ExpiresIn_ASC("`expiresIn` ASC"),ExpiresIn_DESC("`expiresIn` 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(WxAppinfo.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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,92 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_b_user_merchant") | |||
| public class WxBUserMerchant extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*B端用户id**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="B端用户id",name="bUserId") | |||
| private Integer bUserId; | |||
| /*商户id**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户id",name="merchantId") | |||
| private Integer merchantId; | |||
| public Integer getBUserId() { | |||
| return bUserId; | |||
| } | |||
| public void setBUserId(Integer _bUserId) { | |||
| bUserId = _bUserId; | |||
| } | |||
| public Integer getMerchantId() { | |||
| return merchantId; | |||
| } | |||
| public void setMerchantId(Integer _merchantId) { | |||
| merchantId = _merchantId; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,BUserId_ASC("`bUserId` ASC"),BUserId_DESC("`bUserId` DESC") | |||
| ,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` 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(WxBUserMerchant.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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,152 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_banners") | |||
| public class WxBanners extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*封面图**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="封面图",name="facePicUrl") | |||
| private String facePicUrl; | |||
| /*活动类型 1h5页面2视频**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="活动类型 1h5页面2视频",name="activityType") | |||
| private Integer activityType; | |||
| /*链接**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="链接",name="url") | |||
| private String url; | |||
| /*排序**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="排序",name="order") | |||
| private Integer order; | |||
| /*创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| /*上线时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="上线时间",name="uptime") | |||
| private Date uptime; | |||
| /*说明**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="说明",name="desc") | |||
| private String desc; | |||
| /*状态 1启用 2停用**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="状态 1启用 2停用",name="isEnable") | |||
| private Integer isEnable; | |||
| public String getFacePicUrl() { | |||
| return facePicUrl; | |||
| } | |||
| public void setFacePicUrl(String _facePicUrl) { | |||
| facePicUrl = _facePicUrl; | |||
| } | |||
| public Integer getActivityType() { | |||
| return activityType; | |||
| } | |||
| public void setActivityType(Integer _activityType) { | |||
| activityType = _activityType; | |||
| } | |||
| public String getUrl() { | |||
| return url; | |||
| } | |||
| public void setUrl(String _url) { | |||
| url = _url; | |||
| } | |||
| public Integer getOrder() { | |||
| return order; | |||
| } | |||
| public void setOrder(Integer _order) { | |||
| order = _order; | |||
| } | |||
| public Date getCreatetime() { | |||
| return createtime; | |||
| } | |||
| public void setCreatetime(Date _createtime) { | |||
| createtime = _createtime; | |||
| } | |||
| public Date getUptime() { | |||
| return uptime; | |||
| } | |||
| public void setUptime(Date _uptime) { | |||
| uptime = _uptime; | |||
| } | |||
| public String getDesc() { | |||
| return desc; | |||
| } | |||
| public void setDesc(String _desc) { | |||
| desc = _desc; | |||
| } | |||
| public Integer getIsEnable() { | |||
| return isEnable; | |||
| } | |||
| public void setIsEnable(Integer _isEnable) { | |||
| isEnable = _isEnable; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,FacePicUrl_ASC("`facePicUrl` ASC"),FacePicUrl_DESC("`facePicUrl` DESC") | |||
| ,ActivityType_ASC("`activityType` ASC"),ActivityType_DESC("`activityType` DESC") | |||
| ,Url_ASC("`url` ASC"),Url_DESC("`url` DESC") | |||
| ,Order_ASC("`order` ASC"),Order_DESC("`order` DESC") | |||
| ,Createtime_ASC("`createtime` ASC"),Createtime_DESC("`createtime` DESC") | |||
| ,Uptime_ASC("`uptime` ASC"),Uptime_DESC("`uptime` DESC") | |||
| ,Desc_ASC("`desc` ASC"),Desc_DESC("`desc` DESC") | |||
| ,IsEnable_ASC("`isEnable` ASC"),IsEnable_DESC("`isEnable` 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(WxBanners.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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,82 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_business") | |||
| public class WxBusiness extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*业态名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="业态名",name="title") | |||
| private String title; | |||
| public String getTitle() { | |||
| return title; | |||
| } | |||
| public void setTitle(String _title) { | |||
| title = _title; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,Title_ASC("`title` ASC"),Title_DESC("`title` 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(WxBusiness.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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,262 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_c_user") | |||
| public class WxCUser extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*微信openId**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信openId",name="openId") | |||
| private String openId; | |||
| /*微信unionId**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信unionId",name="unionId") | |||
| private String unionId; | |||
| /*用户昵称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户昵称",name="nickName") | |||
| private String nickName; | |||
| /*用户头像地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户头像地址",name="gender") | |||
| private Integer gender; | |||
| /*用户头像地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户头像地址",name="avatarUrl") | |||
| private String avatarUrl; | |||
| /*用户绑定的手机号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户绑定的手机号",name="phone") | |||
| private String phone; | |||
| /*用户没有区号的手机号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户没有区号的手机号",name="purePhone") | |||
| private String purePhone; | |||
| /*用户所在城市**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在城市",name="city") | |||
| private String city; | |||
| /*用户所在省份**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在省份",name="province") | |||
| private String province; | |||
| /*用户所在语言**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在语言",name="language") | |||
| private String language; | |||
| /*用户手机区号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户手机区号",name="countryCode") | |||
| private String countryCode; | |||
| /*注册时记录用户扫码渠道,如朋友圈广告**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="注册时记录用户扫码渠道,如朋友圈广告",name="qrcodeSource") | |||
| private String qrcodeSource; | |||
| /*用户注册IP**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户注册IP",name="registerIp") | |||
| private String registerIp; | |||
| /*二维码**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="二维码",name="scene") | |||
| private String scene; | |||
| /*渠道**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="渠道",name="sceneAddress") | |||
| private String sceneAddress; | |||
| /*session key**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="session key",name="sessionKey") | |||
| private String sessionKey; | |||
| /*更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| /*创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /*积分**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="积分",name="score") | |||
| private Integer score; | |||
| public String getOpenId() { | |||
| return openId; | |||
| } | |||
| public void setOpenId(String _openId) { | |||
| openId = _openId; | |||
| } | |||
| public String getUnionId() { | |||
| return unionId; | |||
| } | |||
| public void setUnionId(String _unionId) { | |||
| unionId = _unionId; | |||
| } | |||
| public String getNickName() { | |||
| return nickName; | |||
| } | |||
| public void setNickName(String _nickName) { | |||
| nickName = _nickName; | |||
| } | |||
| public Integer getGender() { | |||
| return gender; | |||
| } | |||
| public void setGender(Integer _gender) { | |||
| gender = _gender; | |||
| } | |||
| public String getAvatarUrl() { | |||
| return avatarUrl; | |||
| } | |||
| public void setAvatarUrl(String _avatarUrl) { | |||
| avatarUrl = _avatarUrl; | |||
| } | |||
| public String getPhone() { | |||
| return phone; | |||
| } | |||
| public void setPhone(String _phone) { | |||
| phone = _phone; | |||
| } | |||
| public String getPurePhone() { | |||
| return purePhone; | |||
| } | |||
| public void setPurePhone(String _purePhone) { | |||
| purePhone = _purePhone; | |||
| } | |||
| public String getCity() { | |||
| return city; | |||
| } | |||
| public void setCity(String _city) { | |||
| city = _city; | |||
| } | |||
| public String getProvince() { | |||
| return province; | |||
| } | |||
| public void setProvince(String _province) { | |||
| province = _province; | |||
| } | |||
| public String getLanguage() { | |||
| return language; | |||
| } | |||
| public void setLanguage(String _language) { | |||
| language = _language; | |||
| } | |||
| public String getCountryCode() { | |||
| return countryCode; | |||
| } | |||
| public void setCountryCode(String _countryCode) { | |||
| countryCode = _countryCode; | |||
| } | |||
| public String getQrcodeSource() { | |||
| return qrcodeSource; | |||
| } | |||
| public void setQrcodeSource(String _qrcodeSource) { | |||
| qrcodeSource = _qrcodeSource; | |||
| } | |||
| public String getRegisterIp() { | |||
| return registerIp; | |||
| } | |||
| public void setRegisterIp(String _registerIp) { | |||
| registerIp = _registerIp; | |||
| } | |||
| public String getScene() { | |||
| return scene; | |||
| } | |||
| public void setScene(String _scene) { | |||
| scene = _scene; | |||
| } | |||
| public String getSceneAddress() { | |||
| return sceneAddress; | |||
| } | |||
| public void setSceneAddress(String _sceneAddress) { | |||
| sceneAddress = _sceneAddress; | |||
| } | |||
| public String getSessionKey() { | |||
| return sessionKey; | |||
| } | |||
| public void setSessionKey(String _sessionKey) { | |||
| sessionKey = _sessionKey; | |||
| } | |||
| public Date getUpdateDate() { | |||
| return updateDate; | |||
| } | |||
| public void setUpdateDate(Date _updateDate) { | |||
| updateDate = _updateDate; | |||
| } | |||
| public Date getCreateDate() { | |||
| return createDate; | |||
| } | |||
| public void setCreateDate(Date _createDate) { | |||
| createDate = _createDate; | |||
| } | |||
| public Integer getScore() { | |||
| return score; | |||
| } | |||
| public void setScore(Integer _score) { | |||
| score = _score; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,OpenId_ASC("`openId` ASC"),OpenId_DESC("`openId` DESC") | |||
| ,UnionId_ASC("`unionId` ASC"),UnionId_DESC("`unionId` DESC") | |||
| ,NickName_ASC("`nickName` ASC"),NickName_DESC("`nickName` DESC") | |||
| ,Gender_ASC("`gender` ASC"),Gender_DESC("`gender` DESC") | |||
| ,AvatarUrl_ASC("`avatarUrl` ASC"),AvatarUrl_DESC("`avatarUrl` DESC") | |||
| ,Phone_ASC("`phone` ASC"),Phone_DESC("`phone` DESC") | |||
| ,PurePhone_ASC("`purePhone` ASC"),PurePhone_DESC("`purePhone` DESC") | |||
| ,City_ASC("`city` ASC"),City_DESC("`city` DESC") | |||
| ,Province_ASC("`province` ASC"),Province_DESC("`province` DESC") | |||
| ,Language_ASC("`language` ASC"),Language_DESC("`language` DESC") | |||
| ,CountryCode_ASC("`countryCode` ASC"),CountryCode_DESC("`countryCode` DESC") | |||
| ,QrcodeSource_ASC("`qrcodeSource` ASC"),QrcodeSource_DESC("`qrcodeSource` DESC") | |||
| ,RegisterIp_ASC("`registerIp` ASC"),RegisterIp_DESC("`registerIp` DESC") | |||
| ,Scene_ASC("`scene` ASC"),Scene_DESC("`scene` DESC") | |||
| ,SceneAddress_ASC("`sceneAddress` ASC"),SceneAddress_DESC("`sceneAddress` DESC") | |||
| ,SessionKey_ASC("`sessionKey` ASC"),SessionKey_DESC("`sessionKey` DESC") | |||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | |||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | |||
| ,Score_ASC("`score` ASC"),Score_DESC("`score` 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(WxCUser.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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,92 @@ | |||
| package com.simple.domain.po; | |||
| import com.simple.common.crud.BaseModel; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import java.math.*; | |||
| import javax.persistence.Transient; | |||
| import com.simple.annotation.HoldBegin; | |||
| import com.simple.annotation.HoldEnd; | |||
| @Table(name = "wx_c_user_cars") | |||
| public class WxCUserCars extends BaseModel { | |||
| private static final long serialVersionUID = 1L; | |||
| /*c端用户id**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="cUserId") | |||
| private Integer cUserId; | |||
| /*车牌号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="车牌号",name="carNumber") | |||
| private String carNumber; | |||
| public Integer getCUserId() { | |||
| return cUserId; | |||
| } | |||
| public void setCUserId(Integer _cUserId) { | |||
| cUserId = _cUserId; | |||
| } | |||
| public String getCarNumber() { | |||
| return carNumber; | |||
| } | |||
| public void setCarNumber(String _carNumber) { | |||
| carNumber = _carNumber; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,CUserId_ASC("`cUserId` ASC"),CUserId_DESC("`cUserId` DESC") | |||
| ,CarNumber_ASC("`carNumber` ASC"),CarNumber_DESC("`carNumber` 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(WxCUserCars.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()); | |||
| } | |||
| super.setSortColumns(sb.toString()); | |||
| } | |||
| @Override | |||
| 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)); | |||
| } | |||
| } | |||
| } | |||