| | |
| | | iUserService.updateAcc(stype,account); |
| | | } else { |
| | | iUserService.delete(account); |
| | | zcService.deleteZc(account); |
| | | } |
| | | return R.status(zcService.saveOrUpdate(zc)); |
| | | } |
| | |
| | | @GetMapping("/inspect") |
| | | public R inspect(String username) { |
| | | Integer userCount = iUserService.selectCount(username); |
| | | if (userCount > 0) { |
| | | Integer integer = zcService.selecyZcCount(username); |
| | | if (userCount > 0 || integer > 0) { |
| | | throw new org.springblade.core.log.exception.ServiceException(StringUtil.format("当前用户{}已存在!", username)); |
| | | } |
| | | return R.success("当前用户不存在!"); |
| | |
| | | |
| | | void inster(Zc zc); |
| | | String selectType(String username); |
| | | Integer selecyZcCount(String account); |
| | | void deleteZc(String account); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | <!--注册新增--> |
| | | <insert id="inster" useGeneratedKeys="true" keyProperty="id" keyColumn="id"> |
| | | insert into act_zc(username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction,cardid) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid},#{parentId},#{jurisdiction},#{cardid}) |
| | | </insert> |
| | | <insert id="inster" useGeneratedKeys="true" keyProperty="id" keyColumn="id"> |
| | | insert into act_zc(username, password, sname, sex, phone, zctime, deptid, parent_id, jurisdiction, cardid) |
| | | values (#{username}, #{password}, #{sname}, #{sex}, #{phone}, #{zctime}, #{deptid}, #{parentId}, |
| | | #{jurisdiction}, #{cardid}) |
| | | </insert> |
| | | |
| | | <select id="selectType" resultType="String"> |
| | | select type from act_zc where username=#{param1} |
| | | select type |
| | | from act_zc |
| | | where username = #{param1} |
| | | </select> |
| | | |
| | | <select id="selecyZcCount" resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from act_zc |
| | | where username =#{account} |
| | | </select> |
| | | |
| | | <delete id="deleteZc"> |
| | | delete from act_zc where username=#{account} |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | IPage<ZcVO> selectZcPage(IPage<ZcVO> page, ZcVO zc); |
| | | void inster(Zc zc); |
| | | String selectType(String username); |
| | | Integer selecyZcCount(String account); |
| | | void deleteZc(String account); |
| | | } |
| | |
| | | return baseMapper.selectType(username); |
| | | } |
| | | |
| | | @Override |
| | | public Integer selecyZcCount(String account) { |
| | | return baseMapper.selecyZcCount(account); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteZc(String account) { |
| | | baseMapper.deleteZc(account); |
| | | } |
| | | |
| | | } |