diff --git a/pom.xml b/pom.xml index 1f5b196474c449ca138e5ccf8d717d45b1710295..b467e183e63490d983dc7583c49ff910009d569c 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ 3.8.0 1.3.0.Beta2 1.18.4 + 1.2.55 com.simon @@ -243,7 +244,7 @@ com.alibaba fastjson - 1.2.47 + ${fastjson.version} diff --git a/web/src/main/java/com/simon/common/aspect/ButtonAuthorityAspect.java b/web/src/main/java/com/simon/common/aspect/ButtonAuthorityAspect.java index 6ef204986385d1de49a8064a788a3f0d4e96abdc..3195425896d9803db8e1671dcbb9a96da698209c 100644 --- a/web/src/main/java/com/simon/common/aspect/ButtonAuthorityAspect.java +++ b/web/src/main/java/com/simon/common/aspect/ButtonAuthorityAspect.java @@ -38,7 +38,8 @@ public class ButtonAuthorityAspect { for(Object object : pjp.getArgs()){ if(object instanceof Model){ Model model = (Model) object; - List buttonAuthorityDtoList = sideMenuService.findButtonAuthorityDtoByEntityName("NewsInfo"); + String simpleClassName = pjp.getTarget().getClass().getSimpleName(); + List buttonAuthorityDtoList = sideMenuService.findButtonAuthorityDtoByEntityName(simpleClassName.substring(0, simpleClassName.indexOf("Controller"))); if (null != buttonAuthorityDtoList && buttonAuthorityDtoList.size() > 0){ buttonAuthorityDtoList.forEach(item -> model.addAttribute(item.getRemark(), item.getAuthority())); } diff --git a/web/src/main/java/com/simon/controller/NewsInfoController.java b/web/src/main/java/com/simon/controller/NewsInfoController.java index 3749932fdb9020ce5ce0cc85140ddca714a1a6e6..8b66c1a0ab740a684eb5199d161fc5883bdb7031 100644 --- a/web/src/main/java/com/simon/controller/NewsInfoController.java +++ b/web/src/main/java/com/simon/controller/NewsInfoController.java @@ -83,7 +83,7 @@ public class NewsInfoController extends BaseController{ } @ApiOperation(value = "新增") - @PostMapping + @PostMapping("add") @ResponseBody public ResultMsg add(@RequestBody NewsInfo body, Authentication authentication){ Object principal = authentication.getPrincipal(); @@ -99,7 +99,7 @@ public class NewsInfoController extends BaseController{ } @ApiOperation(value = "修改") - @PatchMapping + @PatchMapping("edit") @ResponseBody public ResultMsg update(@RequestBody NewsInfo body, Authentication authentication){ Object principal = authentication.getPrincipal(); diff --git a/web/src/main/java/com/simon/controller/OauthUserController.java b/web/src/main/java/com/simon/controller/OauthUserController.java index 6361e8f777f6b6cd160fd2e96f9262b795ccc437..df13733adf3880c64b42e5135a54ee483fb700b4 100644 --- a/web/src/main/java/com/simon/controller/OauthUserController.java +++ b/web/src/main/java/com/simon/controller/OauthUserController.java @@ -1,90 +1,127 @@ package com.simon.controller; import com.alibaba.fastjson.JSON; -import com.github.pagehelper.PageInfo; import com.simon.common.controller.BaseController; import com.simon.common.domain.EasyUIDataGridResult; import com.simon.common.domain.ResultMsg; import com.simon.common.domain.UserEntity; import com.simon.common.utils.BeanUtils; -import com.simon.dto.StatisticDto; import com.simon.model.OauthUser; +import com.simon.service.DictTypeService; import com.simon.service.OauthUserService; -import com.simon.service.SmsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.MessageSource; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; -import javax.annotation.security.PermitAll; -import java.util.HashMap; -import java.util.List; +import java.util.Date; +import java.util.LinkedHashMap; import java.util.Map; /** - * @author simon - * @date 2016/8/21 - */ +* 用户表 +* +* @author SimonSun +* @date 2019-01-22 +**/ @Slf4j -@Api(description = "用户信息") +@Api(description = "用户表") @Controller @RequestMapping("/api/oauthUsers") -public class OauthUserController extends BaseController { - @Autowired - private MessageSource messageSource; +public class OauthUserController extends BaseController{ @Autowired private OauthUserService oauthUserService; @Autowired - @Qualifier(value = "yzxSmsServiceImpl") - private SmsService smsService; + private DictTypeService dictTypeService; + + @ApiIgnore + @ApiOperation(value = "列表页面") + @GetMapping("list") + public String list(Model model){ + model.addAttribute("sexTypeList", dictTypeService.getTypeByGroupCode("sex_type")); + model.addAttribute("loginTypeList", dictTypeService.getTypeByGroupCode("login_type")); + model.addAttribute("loginStatusList", dictTypeService.getTypeByGroupCode("login_status")); + model.addAttribute("enabledStatusList", dictTypeService.getTypeByGroupCode("enabled_status")); + return "easyui/oauthUser/list"; + } + + @ApiIgnore + @ApiOperation(value = "新增页面") + @GetMapping("add") + public String add(){ + return "easyui/oauthUser/add"; + } - PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(11); + @ApiIgnore + @ApiOperation(value = "编辑页面") + @GetMapping("edit") + public String edit(@RequestParam Long id, Model model){ + model.addAttribute("oauthUser", oauthUserService.findById(id)); + return "easyui/oauthUser/edit"; + } @ApiIgnore - @ApiOperation(value = "easyui列表") - @GetMapping(value = "easyui/list") + @ApiOperation(value = "列表数据") + @GetMapping("data") @ResponseBody - public EasyUIDataGridResult getEasyUiList( - @ApiParam(value = "用户名(昵称)") @RequestParam(required = false) String username, - @ApiParam(value = "手机号") @RequestParam(required = false) String phone, - @ApiParam(value = "邮箱") @RequestParam(required = false) String email, + public EasyUIDataGridResult data( + @ApiParam(value= "用户名")@RequestParam(required = false) String username, + @ApiParam(value= "有效")@RequestParam(required = false) Boolean enabled, + @ApiParam(value= "手机号")@RequestParam(required = false) String phone, + @ApiParam(value= "邮箱")@RequestParam(required = false) String email, + @ApiParam(value= "性别")@RequestParam(required = false) Boolean sex, @ApiParam(value = "页码", defaultValue = "1", required = true) @RequestParam Integer pageNo, @ApiParam(value = "每页条数", defaultValue = "10", required = true)@RequestParam Integer pageSize, @ApiParam(value = "排序")@RequestParam(required = false, defaultValue = "") String orderBy){ - Map params = new HashMap<>(3); + Map params = new LinkedHashMap<>(); params.put("username", username); - params.put("email", email); + params.put("enabled", enabled); params.put("phone", phone); - PageInfo pageInfo = oauthUserService.getList(params, pageSize, (pageNo - 1) * pageSize, orderBy); - return new EasyUIDataGridResult<>(pageInfo.getTotal(), pageInfo.getList()); + params.put("email", email); + params.put("sex", sex); + return new EasyUIDataGridResult<>(oauthUserService.getList(params, pageNo, pageSize, orderBy)); } - @ApiIgnore - @GetMapping(params = "easyui-list") - public String easyUiList(){ - return "easyui/oauth_user"; + @ApiOperation(value = "新增") + @PostMapping("add") + @ResponseBody + public ResultMsg add(@RequestBody OauthUser body, Authentication authentication){ + Object principal = authentication.getPrincipal(); + UserEntity userEntity = null; + if(principal instanceof UserEntity){ + userEntity = (UserEntity)principal; + } + body.setCreateDate(new Date()); + body.setCreateBy(userEntity.getId()); + oauthUserService.insertSelective(body); + return ResultMsg.success(); } - @PostMapping(value = "") + @ApiOperation(value = "修改") + @PatchMapping("edit") @ResponseBody - public ResultMsg add(@RequestBody OauthUser body){ - oauthUserService.save(body); + public ResultMsg update(@RequestBody OauthUser body, Authentication authentication){ + Object principal = authentication.getPrincipal(); + UserEntity userEntity = null; + if(principal instanceof UserEntity){ + userEntity = (UserEntity)principal; + } + body.setUpdateDate(new Date()); + body.setUpdateBy(userEntity.getId()); + oauthUserService.updateByPrimaryKeySelective(body); return ResultMsg.success(); } + @ApiOperation(value = "删除") @DeleteMapping("/ids/{ids}") @ResponseBody public ResultMsg delete(@PathVariable String ids){ @@ -92,13 +129,6 @@ public class OauthUserController extends BaseController { return ResultMsg.success(); } - @PermitAll - @GetMapping("/statistics/sex") - @ResponseBody - public ResultMsg> sexRatio(){ - return ResultMsg.success(oauthUserService.sexRatio()); - } - @ApiIgnore @PreAuthorize("isAuthenticated()") @ApiOperation(value = "个人中心") @@ -117,9 +147,9 @@ public class OauthUserController extends BaseController { } @ApiOperation(value = "更新个人信息") - @PatchMapping + @PatchMapping("personalCenter/edit") @ResponseBody - public ResultMsg update(@RequestBody OauthUser oauthUser, Authentication authentication){ + public ResultMsg updatePersonInfo(@RequestBody OauthUser oauthUser, Authentication authentication){ oauthUserService.updateByPrimaryKeySelective(oauthUser); // log.info("birth=" + new SimpleDateFormat("yyyy-MM-dd").format(oauthUser.getBirth())); @@ -137,5 +167,4 @@ public class OauthUserController extends BaseController { return ResultMsg.success(); } - -} +} \ No newline at end of file diff --git a/web/src/main/java/com/simon/controller/TableController.java b/web/src/main/java/com/simon/controller/TableController.java index d0550bd1832e2ab32c0342bc6fb92cfb32ee2925..ea8f1f08073871ebd2426c0125aa99384169147a 100644 --- a/web/src/main/java/com/simon/controller/TableController.java +++ b/web/src/main/java/com/simon/controller/TableController.java @@ -117,7 +117,6 @@ public class TableController extends BaseController { model.addAttribute("entityName", entityName); try { EntityDataModel entityDataModel = DbUtil.getEntityModel(dataSource.getConnection(), tableName, CodeGenerator.BASE_PACKAGE, entityName); - List columns = entityDataModel.getColumns(); //想隐藏显示的列 List hiddenColumns = new ArrayList<>(); @@ -133,7 +132,7 @@ public class TableController extends BaseController { denyInputColumns.add("updateDate"); denyInputColumns.add("updateBy"); - for(Column column : columns){ + for(Column column : entityDataModel.getColumns()){ if(hiddenColumns.contains(column.getName())){ column.setHidden(true); } @@ -141,7 +140,10 @@ public class TableController extends BaseController { column.setAllowInput(false); } } + + log.info(JSON.toJSONString(entityDataModel.getColumns())); model.addAttribute("tableEntity", entityDataModel); + } catch (Exception e) { e.printStackTrace(); } diff --git a/web/src/main/java/com/simon/mapper/OauthUserMapper.java b/web/src/main/java/com/simon/mapper/OauthUserMapper.java index c0d1878b5f0456d85eb1396ddf96614b984328cb..faf3902e4281a7518c96b0d2ed54413c30b20184 100644 --- a/web/src/main/java/com/simon/mapper/OauthUserMapper.java +++ b/web/src/main/java/com/simon/mapper/OauthUserMapper.java @@ -3,7 +3,9 @@ package com.simon.mapper; import com.simon.common.mapper.MyMapper; import com.simon.dto.StatisticDto; import com.simon.model.OauthUser; +import com.simon.provider.OauthUserProvider; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.SelectProvider; import java.util.List; import java.util.Map; @@ -15,5 +17,11 @@ public interface OauthUserMapper extends MyMapper { List sexRatio(); - List getList(@Param("map") Map map); + /** + * 使用Map查询 + * @param map 查询条件 + * @return 结果列表 + */ + @SelectProvider(type = OauthUserProvider.class, method = "getList") + List getList(Map map); } \ No newline at end of file diff --git a/web/src/main/java/com/simon/provider/OauthUserProvider.java b/web/src/main/java/com/simon/provider/OauthUserProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..41414d09d60cb5a5c3f16d684c559479f0018741 --- /dev/null +++ b/web/src/main/java/com/simon/provider/OauthUserProvider.java @@ -0,0 +1,45 @@ +package com.simon.provider; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.jdbc.SQL; + +import java.util.Map; + +/** +* 用户表 +* @author SimonSun +* @date 2019-01-22 +**/ + +public class OauthUserProvider { + /** + * 构造SQL查询语句 + * @param param 查询条件 + * @return SQL字符串 + */ + public String getList(Map param) { + return new SQL() { + { + SELECT("tb1.*,tu1.username AS create_user,tu2.username AS update_user"); + FROM("t_users tb1"); + LEFT_OUTER_JOIN("t_users tu1 ON tb1.create_by = tu1.id"); + LEFT_OUTER_JOIN("t_users tu2 ON tb1.update_by = tu2.id"); + if (null != param.get("username") && StringUtils.isNotEmpty(String.valueOf(param.get("username")))) { + WHERE("tb1.username=#{username}"); + } + if (null != param.get("enabled")) { + WHERE("tb1.enabled=#{enabled}"); + } + if (null != param.get("phone") && StringUtils.isNotEmpty(String.valueOf(param.get("phone")))) { + WHERE("tb1.phone=#{phone}"); + } + if (null != param.get("email") && StringUtils.isNotEmpty(String.valueOf(param.get("email")))) { + WHERE("tb1.email=#{email}"); + } + if (null != param.get("sex")) { + WHERE("tb1.sex=#{sex}"); + } + } + }.toString(); + } +} diff --git a/web/src/main/java/com/simon/service/OauthUserService.java b/web/src/main/java/com/simon/service/OauthUserService.java index ce35df4c12355db3edf1b87cdc687fdc53f9cb92..e44dfb37419119c17528525be0eab9ed799514f6 100644 --- a/web/src/main/java/com/simon/service/OauthUserService.java +++ b/web/src/main/java/com/simon/service/OauthUserService.java @@ -1,13 +1,11 @@ package com.simon.service; -import com.github.pagehelper.PageInfo; import com.simon.common.domain.UserEntity; import com.simon.common.service.BasicService; import com.simon.dto.StatisticDto; import com.simon.model.OauthUser; import java.util.List; -import java.util.Map; /** * 用户 @@ -25,8 +23,6 @@ public interface OauthUserService extends BasicService { int updatePwdByOldPwd(String username, String oldPwd, String newPwd); - PageInfo getList(Map params, Integer limit, Integer offset, String orderBy); - List sexRatio(); UserEntity findEntityByPhone(String phone); diff --git a/web/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java b/web/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java index 7e1dc9142fdd92b8838746fca5923184ba4d9b30..c88f48b105adcd47c8e02495b0787c61aa523d8e 100644 --- a/web/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java +++ b/web/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java @@ -8,9 +8,9 @@ import com.simon.common.exception.CodeInvalidException; import com.simon.common.exception.PhoneRegisteredException; import com.simon.common.exception.UserExistsException; import com.simon.common.exception.UserNotValidException; -import com.simon.common.utils.ValidUtil; import com.simon.common.utils.BeanUtils; import com.simon.common.utils.UsernameUtil; +import com.simon.common.utils.ValidUtil; import com.simon.dto.StatisticDto; import com.simon.mapper.AuthorityMapper; import com.simon.mapper.OauthUserMapper; @@ -296,15 +296,17 @@ public class OauthUserServiceImpl implements OauthUserService { } @Override - public PageInfo getList(Map params, Integer limit, Integer offset, String orderBy) { + public PageInfo getList(Map params, Integer pageNo, Integer pageSize, String orderBy) { + if (null == pageSize){ + pageSize = AppConfig.DEFAULT_PAGE_SIZE; + } orderBy = orderBy.trim(); - if (org.springframework.util.StringUtils.isEmpty(orderBy)){ - PageHelper.startPage(offset/limit + 1, limit); + if (StringUtils.isEmpty(orderBy)){ + PageHelper.startPage(pageNo, pageSize); }else{ - PageHelper.startPage(offset/limit + 1, limit, orderBy); + PageHelper.startPage(pageNo, pageSize, orderBy); } - - List list = oauthUserMapper.findByMap(params); + List list = oauthUserMapper.getList(params); return new PageInfo<>(list); } diff --git a/web/src/main/resources/application.yml b/web/src/main/resources/application.yml index cb29d208a426e2d52253f0f42b3ea7d9ef684874..cbee9f01973a394ae1441e7dd1231bd2e7755bd3 100644 --- a/web/src/main/resources/application.yml +++ b/web/src/main/resources/application.yml @@ -1,3 +1,5 @@ + + security: basic: enabled: false @@ -143,4 +145,10 @@ mybatis: map-underscore-to-camel-case: true # 二级缓存的总开关 cache-enabled: false - mapper-locations: classpath:mapping/*.xml \ No newline at end of file + mapper-locations: classpath:mapping/*.xml + +# 解决java.lang.IllegalArgumentException: Request header is too large +server: + max-http-header-size: 1048576 + tomcat: + max-http-post-size: 2097152 \ No newline at end of file diff --git a/web/src/main/resources/templates/code/add.ftl b/web/src/main/resources/templates/code/add.ftl index 5fa0c460ac6c7bc1ffa53cec48e7965d37591d17..b3a0dd1cef66fdf75252e7a61818078f1e9d72e9 100644 --- a/web/src/main/resources/templates/code/add.ftl +++ b/web/src/main/resources/templates/code/add.ftl @@ -6,6 +6,7 @@ <#list columns as column> <#if column.name == "id" || column.name == "createDate" || column.name == "createBy" || column.name == "updateDate" || column.name == "updateBy" || column.name == "userId"> <#else> + <#if (column.allowInput?string('yes', 'no'))=='yes'> <#switch column.easyuiType> <#case "easyui-textbox">
@@ -56,6 +57,7 @@
+
@@ -92,7 +94,7 @@ function add() { doRequest({ formId: '#form_add', - url: '/api/${entityName?uncap_first}s', + url: '/api/${entityName?uncap_first}s/add', type: 'POST', extraData: { <#list columns as column> diff --git a/web/src/main/resources/templates/code/controllerWithPage.ftl b/web/src/main/resources/templates/code/controllerWithPage.ftl index af1cd78a6b2f85c06e0c9ffcd347d170cf6a3780..3e2cc475330d5051756cf03c3b9bc6690fe0e561 100644 --- a/web/src/main/resources/templates/code/controllerWithPage.ftl +++ b/web/src/main/resources/templates/code/controllerWithPage.ftl @@ -118,7 +118,7 @@ public class ${entityName}Controller extends BaseController{ } @ApiOperation(value = "新增") - @PostMapping + @PostMapping("add") @ResponseBody public ResultMsg add(@RequestBody ${entityName} body, Authentication authentication){ Object principal = authentication.getPrincipal(); @@ -138,7 +138,7 @@ public class ${entityName}Controller extends BaseController{ } @ApiOperation(value = "修改") - @PatchMapping + @PatchMapping("edit") @ResponseBody public ResultMsg update(@RequestBody ${entityName} body, Authentication authentication){ Object principal = authentication.getPrincipal(); diff --git a/web/src/main/resources/templates/code/edit.ftl b/web/src/main/resources/templates/code/edit.ftl index ec45837d6a56f67a8af475d2f3a8758ce2814d9f..1aa8e3e1d0719f396112d5d9afebe6f788958d7b 100644 --- a/web/src/main/resources/templates/code/edit.ftl +++ b/web/src/main/resources/templates/code/edit.ftl @@ -6,6 +6,7 @@ <#list columns as column> <#if column.name == "createDate" || column.name == "createBy" || column.name == "updateDate" || column.name == "updateBy" || column.name == "userId"> <#else> + <#if (column.allowInput?string('yes', 'no'))=='yes'> <#switch column.easyuiType> <#case "easyui-textbox">
@@ -56,6 +57,7 @@
+
@@ -77,10 +79,10 @@ <#list columns as column> <#switch column.easyuiType> <#case "image"> - //初始化图片上传按钮 - initFileUpload('#edit_${column.name}', '${column.name}'); - //显示预览图片 - imgPreview('#edit_${column.name}', '${column.name}', row.${column.name}); + //初始化图片上传按钮 + initFileUpload('#edit_${column.name}', '${column.name}'); + //显示预览图片 + imgPreview('#edit_${column.name}', '${column.name}', [[${r'${' + entityName?uncap_first + "." + column.name + r'}'}]]); <#break> <#case "rich_text"> var ${column.name}Editor = UE.getEditor('edit_${column.name}_editor', { @@ -91,6 +93,9 @@ ${column.name}Editor.setContent([[${r'${' + entityName?uncap_first + "." + column.name + r'}'}]]); }); <#break> + <#case "t:dict"> + ${r'$(\'#edit_' + column.name + '\')'}.combobox('setValue', String([[${r'${' + entityName?uncap_first + "." + column.name + r'}'}]])); + <#break> }); @@ -98,7 +103,7 @@ function edit() { doRequest({ formId: '#form_edit', - url: '/api/${entityName?uncap_first}s', + url: '/api/${entityName?uncap_first}s/edit', type: 'PATCH', extraData: { <#list columns as column> diff --git a/web/src/main/resources/templates/code/list.ftl b/web/src/main/resources/templates/code/list.ftl index 7e39f98a88edf958e06440555cce9f9d7c97ac9c..b8876642374117a45ff05c73fbbade95a84aee29 100644 --- a/web/src/main/resources/templates/code/list.ftl +++ b/web/src/main/resources/templates/code/list.ftl @@ -38,9 +38,9 @@
- - - + + +
@@ -179,7 +179,7 @@ function format${dashedToCamel(column.extraInfo)?cap_first}(value, row) { let ${dashedToCamel(column.extraInfo)}List = [[${r'${' + dashedToCamel(column.extraInfo) + 'List}'}]]; for(let i = 0; i < ${dashedToCamel(column.extraInfo)}List.length; i++){ - if(value == ${dashedToCamel(column.extraInfo)}List[i].typeCode){ + if(String(value) == String(${dashedToCamel(column.extraInfo)}List[i].typeCode)){ return ${dashedToCamel(column.extraInfo)}List[i].typeName; } } diff --git a/web/src/main/resources/templates/easyui/code_generate.html b/web/src/main/resources/templates/easyui/code_generate.html index 724f1dfcbf347fc013444495f99facbb1f154d95..55231f00962f42918e23cd575f579cb03d1645df 100644 --- a/web/src/main/resources/templates/easyui/code_generate.html +++ b/web/src/main/resources/templates/easyui/code_generate.html @@ -69,19 +69,19 @@ @@ -161,6 +161,7 @@ $.extend($.fn.datagrid.methods, { $(function(){ var data = [[${tableEntity.columns}]]; + console.log(data); var dg = $('#tt').datagrid({ data: data }); diff --git a/web/src/main/resources/templates/easyui/newsInfo/add.html b/web/src/main/resources/templates/easyui/newsInfo/add.html index aac4b7cd0d54f82064a7373657296f923cd8f820..a87fe5887096a7cbe3e6635193836dd04d00abfc 100644 --- a/web/src/main/resources/templates/easyui/newsInfo/add.html +++ b/web/src/main/resources/templates/easyui/newsInfo/add.html @@ -54,7 +54,7 @@ function add() { doRequest({ formId: '#form_add', - url: '/api/newsInfos', + url: '/api/newsInfos/add', type: 'POST', extraData: { content: UE.getEditor('add_content_editor').getContent(), diff --git a/web/src/main/resources/templates/easyui/newsInfo/edit.html b/web/src/main/resources/templates/easyui/newsInfo/edit.html index 4554ccd3b9a23ddce6998fa20ed7c5ab38635875..6d947a2365ad99a91e02dbeb293c3574b55a10fd 100644 --- a/web/src/main/resources/templates/easyui/newsInfo/edit.html +++ b/web/src/main/resources/templates/easyui/newsInfo/edit.html @@ -57,13 +57,13 @@ //初始化图片上传按钮 initFileUpload('#edit_imageUrl', 'imageUrl'); //显示预览图片 - imgPreview('#edit_imageUrl', 'imageUrl', row.imageUrl); + imgPreview('#edit_imageUrl', 'imageUrl', [[${newsInfo.imageUrl}]]); }); function edit() { doRequest({ formId: '#form_edit', - url: '/api/newsInfos', + url: '/api/newsInfos/edit', type: 'PATCH', extraData: { content: UE.getEditor('edit_content_editor').getContent(), diff --git a/web/src/main/resources/templates/easyui/newsInfo/list.html b/web/src/main/resources/templates/easyui/newsInfo/list.html index e7d6854f6b61624369c10e9754fc3221b3764456..399f1646ff62c2343485bcc479bbb6cdd677fe34 100644 --- a/web/src/main/resources/templates/easyui/newsInfo/list.html +++ b/web/src/main/resources/templates/easyui/newsInfo/list.html @@ -11,9 +11,9 @@
- - - + + +
是否支持搜索 是否隐藏 是否允许输入
diff --git a/web/src/main/resources/templates/easyui/oauthUser/add.html b/web/src/main/resources/templates/easyui/oauthUser/add.html new file mode 100644 index 0000000000000000000000000000000000000000..3ac35e7454712b2abe1055bd0ba5605b8fdc78ec --- /dev/null +++ b/web/src/main/resources/templates/easyui/oauthUser/add.html @@ -0,0 +1,94 @@ + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+
+ + + \ No newline at end of file diff --git a/web/src/main/resources/templates/easyui/oauthUser/edit.html b/web/src/main/resources/templates/easyui/oauthUser/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..1c3bb62162c1368f7a568ed2ef5b400453f344e1 --- /dev/null +++ b/web/src/main/resources/templates/easyui/oauthUser/edit.html @@ -0,0 +1,107 @@ + + + + + +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+
+ + + \ No newline at end of file diff --git a/web/src/main/resources/templates/easyui/oauthUser/list.html b/web/src/main/resources/templates/easyui/oauthUser/list.html new file mode 100644 index 0000000000000000000000000000000000000000..13f78c5ea28e815d68fa6ffac43416ccf8c72195 --- /dev/null +++ b/web/src/main/resources/templates/easyui/oauthUser/list.html @@ -0,0 +1,179 @@ + + + + +
+
+ 用户名: + 有效: + 手机号: + 邮箱: + 性别: + + +
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
id创建人id创建时间更新人id更新时间用户名密码有效手机区号手机号邮箱地址年龄生日头像个人简介性别邀请码登录方式登录状态登录时间
+
+
+
+ + + \ No newline at end of file diff --git a/web/src/main/resources/templates/easyui/personal_center.html b/web/src/main/resources/templates/easyui/personal_center.html index 4ef81c1e654b7e6c2c3efeb298e4a0df740b4e94..c9ddd4d4044b7364ccde567a7c579bcdfedca182 100644 --- a/web/src/main/resources/templates/easyui/personal_center.html +++ b/web/src/main/resources/templates/easyui/personal_center.html @@ -160,7 +160,7 @@ function edit() { doRequest({ formId: '#form_edit', - url: '/api/oauthUsers', + url: '/api/oauthUsers/personalCenter/edit', type: 'PATCH' }); }