| | |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.service.Contact; |
| | | import springfox.documentation.service.*; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spi.service.contexts.SecurityContext; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 插件集成配置 |
| | |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(this.apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.any()) |
| | | .apis(RequestHandlerSelectors.basePackage("com.jsh.erp.controller")) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | .build() |
| | | // 添加登录认证 |
| | | .securityContexts(securityContexts()) |
| | | .securitySchemes(securitySchemes()); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("云游管理系统 Restful Api") |
| | | .description("云游管理系统接口描述") |
| | | .termsOfServiceUrl("http://127.0.0.1") |
| | | .termsOfServiceUrl("http://localhost:8888/jshERP-boot") |
| | | .contact(new Contact("jishenghua", "", "")) |
| | | .version("3.0") |
| | | .build(); |
| | | } |
| | | |
| | | private List<ApiKey> securitySchemes() { |
| | | List<ApiKey> apiKeys = new ArrayList<>(); |
| | | apiKeys.add(new ApiKey("Authorization", "Authorization", "header")); |
| | | return apiKeys; |
| | | } |
| | | |
| | | private List<SecurityContext> securityContexts() { |
| | | List<SecurityContext> securityContexts = new ArrayList<>(); |
| | | securityContexts.add(SecurityContext.builder() |
| | | .securityReferences(defaultAuth()) |
| | | .forPaths(PathSelectors.regex("^(?!auth).*$")) |
| | | .build()); |
| | | return securityContexts; |
| | | } |
| | | |
| | | private List<SecurityReference> defaultAuth() { |
| | | AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); |
| | | AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; |
| | | authorizationScopes[0] = authorizationScope; |
| | | List<SecurityReference> securityReferences = new ArrayList<>(); |
| | | securityReferences.add(new SecurityReference("Authorization", authorizationScopes)); |
| | | return securityReferences; |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.controller; |
| | | |
| | | import com.jsh.erp.datasource.entities.CloudContent; |
| | | import com.jsh.erp.service.cloudContent.CloudContentService; |
| | | import com.jsh.erp.utils.BaseResponseInfo; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/cloudContent") |
| | | @Api(tags = "内容管理接口") |
| | | public class CloudContentController { |
| | | @Resource |
| | | private CloudContentService cloudContentService; |
| | | |
| | | @GetMapping("/list") |
| | | public BaseResponseInfo list(@RequestParam(value = "title", required = false) String title, |
| | | @RequestParam(value = "type", required = false) String type, |
| | | @RequestParam(value = "status", required = false) Integer status, |
| | | @RequestParam("currentPage") Integer currentPage, |
| | | @RequestParam("pageSize") Integer pageSize) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | try { |
| | | CloudContent query = new CloudContent(); |
| | | query.setTitle(title); |
| | | query.setType(type); |
| | | query.setStatus(status); |
| | | |
| | | List<CloudContent> dataList = cloudContentService.getList(query); |
| | | int total = dataList.size(); |
| | | map.put("total", total); |
| | | map.put("rows", dataList); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = map; |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @GetMapping("/getByType") |
| | | public BaseResponseInfo getByType(@RequestParam(value = "type", required = true) String type) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | CloudContent cloudContent = cloudContentService.getByType(type); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = cloudContent; |
| | | } catch (Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | public BaseResponseInfo getById(@PathVariable Long id) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | CloudContent data = cloudContentService.getById(id); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = data; |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PostMapping |
| | | public BaseResponseInfo add(@RequestBody CloudContent cloudContent) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = cloudContentService.add(cloudContent); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = "新增成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PutMapping |
| | | public BaseResponseInfo update(@RequestBody CloudContent cloudContent) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = cloudContentService.update(cloudContent); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = "修改成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public BaseResponseInfo delete(@PathVariable Long id) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = cloudContentService.deleteById(id); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = "删除成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @DeleteMapping("/deleteBatch") |
| | | public BaseResponseInfo deleteBatch(@RequestParam("ids") String ids) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | String[] idArray = ids.split(","); |
| | | int result = 0; |
| | | for(String id : idArray) { |
| | | result += cloudContentService.deleteById(Long.parseLong(id)); |
| | | } |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = "删除成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.controller; |
| | | |
| | | import com.jsh.erp.datasource.entities.User; |
| | | import com.jsh.erp.datasource.entities.UserEx; |
| | | import com.jsh.erp.service.sms.SmsService; |
| | | import com.jsh.erp.service.user.UserService; |
| | | import com.jsh.erp.utils.BaseResponseInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/sms") |
| | | @RequiredArgsConstructor |
| | | public class SmsController { |
| | | private final SmsService smsService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @PostMapping("/send-code") |
| | | public BaseResponseInfo sendCode(@RequestParam String phone) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | boolean success = smsService.sendCode(phone); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = success; |
| | | } catch (Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PostMapping("/login") |
| | | public BaseResponseInfo loginByCode(@RequestParam String phone, @RequestParam String code) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | //验证验证码 |
| | | if (smsService.verifyCode(phone, code)) { |
| | | try { |
| | | //登录处理逻辑 |
| | | //查询用户表中有没有对应手机号的信息,没有就注册 |
| | | User user = userService.getByPhone(phone); |
| | | if (ObjectUtils.isEmpty(user)) { |
| | | UserEx userEx = new UserEx(); |
| | | userEx.setPhonenum(phone); |
| | | userService.addUser(userEx); |
| | | } |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = true; |
| | | } catch (Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } else { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = false; |
| | | return baseResponseInfo; |
| | | } |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.controller; |
| | | |
| | | import com.jsh.erp.datasource.entities.SysDict; |
| | | import com.jsh.erp.datasource.entities.SysDictItem; |
| | | import com.jsh.erp.service.sys.SysDictService; |
| | | import com.jsh.erp.utils.BaseResponseInfo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/sysDict") |
| | | public class SysDictController { |
| | | @Resource |
| | | private SysDictService sysDictService; |
| | | |
| | | @GetMapping("/list") |
| | | public BaseResponseInfo list(@RequestParam(value = "dictCode", required = false) String dictCode, |
| | | @RequestParam(value = "dictName", required = false) String dictName, |
| | | @RequestParam(value = "status", required = false) Integer status, |
| | | @RequestParam("currentPage") Integer currentPage, |
| | | @RequestParam("pageSize") Integer pageSize) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | try { |
| | | SysDict query = new SysDict(); |
| | | query.setDictCode(dictCode); |
| | | query.setDictName(dictName); |
| | | query.setStatus(status); |
| | | |
| | | List<SysDict> dataList = sysDictService.getList(query); |
| | | int total = dataList.size(); |
| | | map.put("total", total); |
| | | map.put("rows", dataList); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = map; |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | public BaseResponseInfo getById(@PathVariable Long id) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | SysDict data = sysDictService.getById(id); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = data; |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PostMapping |
| | | public BaseResponseInfo add(@RequestBody SysDict sysDict) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.add(sysDict); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "新增成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PutMapping |
| | | public BaseResponseInfo update(@RequestBody SysDict sysDict) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.update(sysDict); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "修改成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public BaseResponseInfo delete(@PathVariable Long id) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.deleteById(id); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "删除成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @DeleteMapping("/deleteBatch") |
| | | public BaseResponseInfo deleteBatch(@RequestParam("ids") String ids) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | String[] idArray = ids.split(","); |
| | | int result = 0; |
| | | for(String id : idArray) { |
| | | result += sysDictService.deleteById(Long.parseLong(id)); |
| | | } |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = "删除成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | // 字典项相关接口 |
| | | @GetMapping("/items/{dictId}") |
| | | public BaseResponseInfo getItems(@PathVariable Long dictId) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | List<SysDictItem> items = sysDictService.getItemsByDictId(dictId); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = items; |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PostMapping("/item") |
| | | public BaseResponseInfo addItem(@RequestBody SysDictItem sysDictItem) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.addItem(sysDictItem); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "新增成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @PutMapping("/item") |
| | | public BaseResponseInfo updateItem(@RequestBody SysDictItem sysDictItem) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.updateItem(sysDictItem); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "修改成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | @DeleteMapping("/item/{id}") |
| | | public BaseResponseInfo deleteItem(@PathVariable Long id) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | int result = sysDictService.deleteItemById(id); |
| | | if(result > 0) { |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.msg = "删除成功"; |
| | | } |
| | | } catch(Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.msg = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getByDictCodeAndItemText") |
| | | public BaseResponseInfo getByDictCodeAndItemText(@RequestParam(value = "dictCode", required = true) String dictCode, |
| | | @RequestParam(value = "itemText", required = true) String itemText) { |
| | | BaseResponseInfo baseResponseInfo = new BaseResponseInfo(); |
| | | try { |
| | | SysDictItem sysDictItem = sysDictService.getByDictCodeAndItemText(dictCode,itemText); |
| | | baseResponseInfo.code = 200; |
| | | baseResponseInfo.data = sysDictItem; |
| | | } catch (Exception e) { |
| | | baseResponseInfo.code = 500; |
| | | baseResponseInfo.data = e.getMessage(); |
| | | } |
| | | return baseResponseInfo; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.entities; |
| | | |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class CloudContent { |
| | | private Long id; |
| | | private String type; |
| | | private String title; |
| | | private String content; |
| | | private String version; |
| | | private Integer status; |
| | | private Date createTime; |
| | | private Long creator; |
| | | private Date updateTime; |
| | | private Long updater; |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.entities; |
| | | |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SysDict { |
| | | private Long id; |
| | | private String dictCode; |
| | | private String dictName; |
| | | private String description; |
| | | private Integer status; |
| | | private Date createTime; |
| | | private Long creator; |
| | | private Date updateTime; |
| | | private Long updater; |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.entities; |
| | | |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SysDictItem { |
| | | private Long id; |
| | | private Long dictId; |
| | | private String itemText; |
| | | private String itemValue; |
| | | private String description; |
| | | private Integer sortOrder; |
| | | private Integer status; |
| | | private Date createTime; |
| | | private Long creator; |
| | | private Date updateTime; |
| | | private Long updater; |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.mappers; |
| | | |
| | | import com.jsh.erp.datasource.entities.CloudContent; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CloudContentMapper { |
| | | |
| | | |
| | | @Select("select * from cloud_content where status = '1' and type =#{type} limit 1") |
| | | CloudContent getByType(@Param("type") String type); |
| | | |
| | | List<CloudContent> selectList(CloudContent cloudContent); |
| | | |
| | | CloudContent selectById(Long id); |
| | | |
| | | int insert(CloudContent cloudContent); |
| | | |
| | | int update(CloudContent cloudContent); |
| | | |
| | | int deleteById(Long id); |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.mappers; |
| | | |
| | | import com.jsh.erp.datasource.entities.SysDictItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface SysDictItemMapper { |
| | | List<SysDictItem> selectByDictId(Long dictId); |
| | | |
| | | SysDictItem selectById(Long id); |
| | | |
| | | int insert(SysDictItem sysDictItem); |
| | | |
| | | int update(SysDictItem sysDictItem); |
| | | |
| | | int deleteById(Long id); |
| | | |
| | | int deleteByDictId(Long dictId); |
| | | |
| | | //通过字典类型和字典code查询具体一条 |
| | | @Select("SELECT * FROM sys_dict_item di LEFT JOIN sys_dict d ON di.dict_id = d.id WHERE d.dict_code = #{dictCode} AND di.item_text = #{itemText}") |
| | | SysDictItem getByDictCodeAndItemText(String dictCode, String itemText); |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.datasource.mappers; |
| | | |
| | | import com.jsh.erp.datasource.entities.SysDict; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface SysDictMapper { |
| | | List<SysDict> selectList(SysDict sysDict); |
| | | SysDict selectById(Long id); |
| | | int insert(SysDict sysDict); |
| | | int update(SysDict sysDict); |
| | | int deleteById(Long id); |
| | | SysDict selectByCode(String dictCode); |
| | | } |
| | |
| | | import com.jsh.erp.datasource.entities.UserExample; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | public interface UserMapper { |
| | | long countByExample(UserExample example); |
| | |
| | | int updateByPrimaryKeySelective(User record); |
| | | |
| | | int updateByPrimaryKey(User record); |
| | | |
| | | @Select("select * from jsh_user where phonenum =#{phonenum}") |
| | | User getByPhone(String phonenum); |
| | | } |
| | |
| | | "/jshERP-boot/user/registerUser#/jshERP-boot/user/randomImage#" + |
| | | "/jshERP-boot/platformConfig/getPlatform#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars#" + |
| | | "/jshERP-boot/systemConfig/static#/jshERP-boot/api/plugin/wechat/weChat/share#" + |
| | | "/jshERP-boot/api/plugin/general-ledger/pdf/voucher#/jshERP-boot/api/plugin/tenant-statistics/tenantClean")}) |
| | | "/jshERP-boot/api/plugin/general-ledger/pdf/voucher#/jshERP-boot/api/plugin/tenant-statistics/tenantClean#" + |
| | | "/jshERP-boot/swagger-ui.html#/jshERP-boot/swagger-resources#" + |
| | | "/jshERP-boot/doc.html#/jshERP-boot/swagger-resources/**#" + |
| | | "/jshERP-boot/v2/api-docs/**#/jshERP-boot/webjars/**")}) |
| | | public class LogCostFilter implements Filter { |
| | | |
| | | private static final String FILTER_PATH = "filterPath"; |
| | |
| | | HttpServletRequest servletRequest = (HttpServletRequest) request; |
| | | HttpServletResponse servletResponse = (HttpServletResponse) response; |
| | | String requestUrl = servletRequest.getRequestURI(); |
| | | //具体,比如:处理若用户未登录,则跳转到登录页 |
| | | Object userId = redisService.getObjectFromSessionByKey(servletRequest,"userId"); |
| | | if(userId!=null) { //如果已登录,不阻止 |
| | | |
| | | if (isSwaggerRequest(requestUrl)) { |
| | | chain.doFilter(request, response); |
| | | return; |
| | | } |
| | | if (requestUrl != null && (requestUrl.contains("/doc.html") || |
| | | requestUrl.contains("/user/login") || requestUrl.contains("/user/register"))) { |
| | | |
| | | if (requestUrl != null && ( |
| | | requestUrl.contains("/doc.html") || |
| | | requestUrl.contains("/swagger-ui.html") || |
| | | requestUrl.contains("/swagger-resources") || |
| | | requestUrl.contains("/v2/api-docs") || |
| | | requestUrl.contains("/webjars/") || |
| | | requestUrl.contains("/user/login") || |
| | | requestUrl.contains("/user/register"))) { |
| | | chain.doFilter(request, response); |
| | | return; |
| | | } |
| | | |
| | | Object userId = redisService.getObjectFromSessionByKey(servletRequest,"userId"); |
| | | if(userId!=null) { //如果已登录,不阻止 |
| | | chain.doFilter(request, response); |
| | | return; |
| | | } |
| | |
| | | servletResponse.getWriter().write("loginOut"); |
| | | } |
| | | } |
| | | private boolean isSwaggerRequest(String requestUrl) { |
| | | return requestUrl != null && ( |
| | | requestUrl.contains("/doc.html") || |
| | | requestUrl.contains("/swagger-ui.html") || |
| | | requestUrl.contains("/swagger-resources") || |
| | | requestUrl.contains("/v2/api-docs") || |
| | | requestUrl.contains("/webjars/") || |
| | | requestUrl.contains("/user/login") || |
| | | requestUrl.contains("/user/register") || |
| | | // 添加API尝试请求 |
| | | requestUrl.contains("/cloudContent/getByType") || // 允许未登录访问的API |
| | | requestUrl.contains("/cloudContent/list") || // 允许未登录访问的API |
| | | requestUrl.contains("/sysDict/getByDictCodeAndItemText") //允许查询字典值API |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void destroy() { |
对比新文件 |
| | |
| | | package com.jsh.erp.service.cloudContent; |
| | | |
| | | import com.jsh.erp.datasource.entities.CloudContent; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CloudContentService { |
| | | List<CloudContent> getList(CloudContent cloudContent); |
| | | |
| | | CloudContent getById(Long id); |
| | | |
| | | int add(CloudContent cloudContent); |
| | | |
| | | int update(CloudContent cloudContent); |
| | | |
| | | int deleteById(Long id); |
| | | |
| | | CloudContent getByType(String type); |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.cloudContent.impl; |
| | | |
| | | import com.jsh.erp.datasource.entities.CloudContent; |
| | | import com.jsh.erp.datasource.mappers.CloudContentMapper; |
| | | import com.jsh.erp.service.cloudContent.CloudContentService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CloudContentServiceImpl implements CloudContentService { |
| | | @Resource |
| | | private CloudContentMapper cloudContentMapper; |
| | | |
| | | @Override |
| | | public List<CloudContent> getList(CloudContent cloudContent) { |
| | | return cloudContentMapper.selectList(cloudContent); |
| | | } |
| | | |
| | | @Override |
| | | public CloudContent getById(Long id) { |
| | | return cloudContentMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int add(CloudContent cloudContent) { |
| | | return cloudContentMapper.insert(cloudContent); |
| | | } |
| | | |
| | | @Override |
| | | public int update(CloudContent cloudContent) { |
| | | return cloudContentMapper.update(cloudContent); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteById(Long id) { |
| | | return cloudContentMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public CloudContent getByType(String type) { |
| | | return cloudContentMapper.getByType(type); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.redis; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.connection.RedisConnectionFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.StringRedisSerializer; |
| | | |
| | | @Configuration |
| | | public class RedisConfig { |
| | | @Bean |
| | | public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory factory) { |
| | | RedisTemplate<String, String> template = new RedisTemplate<>(); |
| | | template.setConnectionFactory(factory); |
| | | template.setKeySerializer(new StringRedisSerializer()); |
| | | template.setValueSerializer(new StringRedisSerializer()); |
| | | return template; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.redis; |
| | | |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class RedisUtil { |
| | | private final RedisTemplate<String, String> redisTemplate; |
| | | |
| | | public void setCode(String phone, String code) { |
| | | redisTemplate.opsForValue().set(phone, code, 2, TimeUnit.MINUTES); |
| | | } |
| | | |
| | | public String getCode(String phone) { |
| | | return redisTemplate.opsForValue().get(phone); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.sms; |
| | | |
| | | public interface SmsService { |
| | | boolean sendCode(String phone); |
| | | boolean verifyCode(String phone, String code); |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.sms.impl; |
| | | |
| | | import com.jsh.erp.service.redis.RedisUtil; |
| | | import com.jsh.erp.service.sms.SmsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Random; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class SmsServiceImpl implements SmsService { |
| | | private final RedisUtil redisUtil; |
| | | |
| | | private final String accessKey; |
| | | private final String secretKey; |
| | | private final String region; |
| | | private final String signName; |
| | | private final String templateId; |
| | | |
| | | public SmsServiceImpl(RedisUtil redisUtil, @Value("${volc.sms.access-key}") String accessKey, @Value("${volc.sms.secret-key}") String secretKey, @Value("${volc.sms.region}") String region, @Value("${volc.sms.sign-name}") String signName, @Value("${volc.sms.template-id}") String templateId) { |
| | | this.redisUtil = redisUtil; |
| | | this.accessKey = accessKey; |
| | | this.secretKey = secretKey; |
| | | this.region = region; |
| | | this.signName = signName; |
| | | this.templateId = templateId; |
| | | } |
| | | |
| | | @Override |
| | | public boolean sendCode(String phone) { |
| | | //测试生成固定的凑得 |
| | | String code = "888888"; |
| | | redisUtil.setCode(phone, code); |
| | | return true; |
| | | // // 生成6位随机验证码 |
| | | // String code = String.format("%06d", new Random().nextInt(999999)); |
| | | // |
| | | // // 存储到Redis |
| | | // redisUtil.setCode(phone, code); |
| | | // |
| | | // // 构造火山云请求 |
| | | // try { |
| | | // // 使用火山云短信API(示例为简化版,需根据官方文档调整) |
| | | // String url = "https://sms.volcengineapi.com/v2/send"; |
| | | // String jsonBody = String.format("{\"phone\":\"%s\",\"sign_name\":\"%s\",\"template_id\":\"%s\",\"template_param\":\"{\\\"code\\\":\\\"%s\\\"}\"}", phone, signName, templateId, code); |
| | | // |
| | | // // 生成签名(需按火山云签名算法实现) |
| | | // String signature = generateVolcSignature(accessKey, secretKey); |
| | | // |
| | | // // 发送HTTP请求 |
| | | // CloseableHttpClient client = HttpClients.createDefault(); |
| | | // HttpPost httpPost = new HttpPost(url); |
| | | // httpPost.setHeader("Content-Type", "application/json"); |
| | | // httpPost.setHeader("Authorization", "HMAC-SHA256 Credential=" + accessKey + ",Signature=" + signature); |
| | | // httpPost.setEntity(new StringEntity(jsonBody)); |
| | | // |
| | | // CloseableHttpResponse response = client.execute(httpPost); |
| | | // return response.getStatusLine().getStatusCode() == 200; |
| | | // } catch (Exception e) { |
| | | // log.error("短信发送失败: {}", e.getMessage()); |
| | | // return false; |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | | public boolean verifyCode(String phone, String code) { |
| | | String storedCode = redisUtil.getCode(phone); |
| | | return code != null && code.equals(storedCode); |
| | | } |
| | | |
| | | // 火山云签名生成方法(需根据官方文档实现) |
| | | private String generateVolcSignature(String accessKey, String secretKey) { |
| | | // 实际需按火山云签名算法生成(示例简化) |
| | | return "generated_signature"; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.sys; |
| | | |
| | | import com.jsh.erp.datasource.entities.SysDict; |
| | | import com.jsh.erp.datasource.entities.SysDictItem; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface SysDictService { |
| | | List<SysDict> getList(SysDict sysDict); |
| | | |
| | | SysDict getById(Long id); |
| | | |
| | | int add(SysDict sysDict); |
| | | |
| | | int update(SysDict sysDict); |
| | | |
| | | int deleteById(Long id); |
| | | |
| | | SysDict getByCode(String dictCode); |
| | | |
| | | // 字典项相关 |
| | | List<SysDictItem> getItemsByDictId(Long dictId); |
| | | |
| | | SysDictItem getItemById(Long id); |
| | | |
| | | int addItem(SysDictItem sysDictItem); |
| | | |
| | | int updateItem(SysDictItem sysDictItem); |
| | | |
| | | int deleteItemById(Long id); |
| | | |
| | | SysDictItem getByDictCodeAndItemText(String dictCode, String itemText); |
| | | } |
对比新文件 |
| | |
| | | package com.jsh.erp.service.sys.impl; |
| | | |
| | | import com.jsh.erp.datasource.entities.SysDict; |
| | | import com.jsh.erp.datasource.entities.SysDictItem; |
| | | import com.jsh.erp.datasource.mappers.SysDictItemMapper; |
| | | import com.jsh.erp.datasource.mappers.SysDictMapper; |
| | | import com.jsh.erp.service.sys.SysDictService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class SysDictServiceImpl implements SysDictService { |
| | | @Resource |
| | | private SysDictMapper sysDictMapper; |
| | | |
| | | @Resource |
| | | private SysDictItemMapper sysDictItemMapper; |
| | | |
| | | @Override |
| | | public List<SysDict> getList(SysDict sysDict) { |
| | | return sysDictMapper.selectList(sysDict); |
| | | } |
| | | |
| | | @Override |
| | | public SysDict getById(Long id) { |
| | | return sysDictMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int add(SysDict sysDict) { |
| | | return sysDictMapper.insert(sysDict); |
| | | } |
| | | |
| | | @Override |
| | | public int update(SysDict sysDict) { |
| | | return sysDictMapper.update(sysDict); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public int deleteById(Long id) { |
| | | sysDictItemMapper.deleteByDictId(id); |
| | | return sysDictMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public SysDict getByCode(String dictCode) { |
| | | return sysDictMapper.selectByCode(dictCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysDictItem> getItemsByDictId(Long dictId) { |
| | | return sysDictItemMapper.selectByDictId(dictId); |
| | | } |
| | | |
| | | @Override |
| | | public SysDictItem getItemById(Long id) { |
| | | return sysDictItemMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int addItem(SysDictItem sysDictItem) { |
| | | return sysDictItemMapper.insert(sysDictItem); |
| | | } |
| | | |
| | | @Override |
| | | public int updateItem(SysDictItem sysDictItem) { |
| | | return sysDictItemMapper.update(sysDictItem); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteItemById(Long id) { |
| | | return sysDictItemMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public SysDictItem getByDictCodeAndItemText(String dictCode, String itemText) { |
| | | return sysDictItemMapper.getByDictCodeAndItemText(dictCode, itemText); |
| | | } |
| | | } |
| | |
| | | import com.jsh.erp.service.redis.RedisService; |
| | | import com.jsh.erp.service.role.RoleService; |
| | | import com.jsh.erp.utils.HttpClient; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | } |
| | | return 0; |
| | | } |
| | | public User getByPhone(String phonenum){ |
| | | User user = userMapper.getByPhone(phonenum); |
| | | if (!ObjectUtils.isEmpty(user)) { |
| | | return user; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | public class BaseResponseInfo { |
| | | public int code; |
| | | public String msg; |
| | | public Object data; |
| | | |
| | | public BaseResponseInfo() { |
| | | code = 400; |
| | | data = null; |
| | | msg = ""; |
| | | } |
| | | } |
| | |
| | | #mybatis-plus配置 |
| | | mybatis-plus.mapper-locations=classpath:./mapper_xml/*.xml |
| | | # Redis |
| | | spring.redis.host=192.168.1.235 |
| | | #spring.redis.host=192.168.1.235 |
| | | spring.redis.host=localhost |
| | | spring.redis.port=6379 |
| | | spring.redis.password=123456 |
| | | #spring.redis.password=123456 |
| | | #租户对应的角色id |
| | | manage.roleId=10 |
| | | #租户允许创建的用户数 |
| | |
| | | server.tomcat.basedir=/opt/tmp/tomcat |
| | | #文件上传限制(byte) |
| | | spring.servlet.multipart.max-file-size=10485760 |
| | | spring.servlet.multipart.max-request-size=10485760 |
| | | spring.servlet.multipart.max-request-size=10485760 |
| | | |
| | | # ??????? |
| | | volc.sms.access-key= your-volc-access-key # ???AccessKey |
| | | volc.sms.secret-key= your-volc-secret-key # ???SecretKey |
| | | volc.sms.region= cn-north-1 # ?????????? |
| | | volc.sms.sign-name= ????? # ???? |
| | | volc.sms.template-id= SMS_1234567890 # ????ID |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jsh.erp.datasource.mappers.CloudContentMapper"> |
| | | <select id="selectList" resultType="com.jsh.erp.datasource.entities.CloudContent"> |
| | | select * from cloud_content |
| | | <where> |
| | | <if test="type != null and type != ''"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | and title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.jsh.erp.datasource.entities.CloudContent"> |
| | | select * from cloud_content where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.jsh.erp.datasource.entities.CloudContent"> |
| | | insert into cloud_content |
| | | (type, title, content, version, status, create_time, creator, update_time, updater) |
| | | values |
| | | (#{type}, #{title}, #{content}, #{version}, #{status}, now(), #{creator}, now(), #{updater}) |
| | | </insert> |
| | | |
| | | <update id="update" parameterType="com.jsh.erp.datasource.entities.CloudContent"> |
| | | update cloud_content |
| | | <set> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="title != null">title = #{title},</if> |
| | | <if test="content != null">content = #{content},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | update_time = now(), |
| | | <if test="updater != null">updater = #{updater},</if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteById"> |
| | | delete from cloud_content where id = #{id} |
| | | </delete> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jsh.erp.datasource.mappers.SysDictItemMapper"> |
| | | <select id="selectByDictId" resultType="com.jsh.erp.datasource.entities.SysDictItem"> |
| | | select * from sys_dict_item |
| | | where dict_id = #{dictId} |
| | | order by sort_order asc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.jsh.erp.datasource.entities.SysDictItem"> |
| | | select * from sys_dict_item where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.jsh.erp.datasource.entities.SysDictItem"> |
| | | insert into sys_dict_item |
| | | (dict_id, item_text, item_value, description, sort_order, status, create_time, creator, update_time, updater) |
| | | values |
| | | (#{dictId}, #{itemText}, #{itemValue}, #{description}, #{sortOrder}, #{status}, now(), #{creator}, now(), #{updater}) |
| | | </insert> |
| | | |
| | | <update id="update" parameterType="com.jsh.erp.datasource.entities.SysDictItem"> |
| | | update sys_dict_item |
| | | <set> |
| | | <if test="itemText != null">item_text = #{itemText},</if> |
| | | <if test="itemValue != null">item_value = #{itemValue},</if> |
| | | <if test="description != null">description = #{description},</if> |
| | | <if test="sortOrder != null">sort_order = #{sortOrder},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | update_time = now(), |
| | | <if test="updater != null">updater = #{updater},</if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteById"> |
| | | delete from sys_dict_item where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteByDictId"> |
| | | delete from sys_dict_item where dict_id = #{dictId} |
| | | </delete> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jsh.erp.datasource.mappers.SysDictMapper"> |
| | | <select id="selectList" resultType="com.jsh.erp.datasource.entities.SysDict"> |
| | | select * from sys_dict |
| | | <where> |
| | | <if test="dictCode != null and dictCode != ''"> |
| | | and dict_code like concat('%', #{dictCode}, '%') |
| | | </if> |
| | | <if test="dictName != null and dictName != ''"> |
| | | and dict_name like concat('%', #{dictName}, '%') |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.jsh.erp.datasource.entities.SysDict"> |
| | | select * from sys_dict where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByCode" resultType="com.jsh.erp.datasource.entities.SysDict"> |
| | | select * from sys_dict where dict_code = #{dictCode} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.jsh.erp.datasource.entities.SysDict"> |
| | | insert into sys_dict |
| | | (dict_code, dict_name, description, status, create_time, creator, update_time, updater) |
| | | values |
| | | (#{dictCode}, #{dictName}, #{description}, #{status}, now(), #{creator}, now(), #{updater}) |
| | | </insert> |
| | | |
| | | <update id="update" parameterType="com.jsh.erp.datasource.entities.SysDict"> |
| | | update sys_dict |
| | | <set> |
| | | <if test="dictCode != null">dict_code = #{dictCode},</if> |
| | | <if test="dictName != null">dict_name = #{dictName},</if> |
| | | <if test="description != null">description = #{description},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | update_time = now(), |
| | | <if test="updater != null">updater = #{updater},</if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteById"> |
| | | delete from sys_dict where id = #{id} |
| | | </delete> |
| | | </mapper> |