洪城义警-正式版后台
zengh
2021-11-05 0779d38053cb64734516dc4a815e399f10e31ade
穿透修改
4 files modified
77 ■■■■■ changed files
src/main/java/org/springblade/modules/system/controller/UserController.java 35 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/controller/ZcController.java 30 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml 10 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -501,23 +501,24 @@
        boolean status = userService.save(user);
        //头像
        if (null!=user.getAvatar() && !user.getAvatar().equals("")) {
            user.setAvatar(FtpConfig.ip + user.getAvatar().substring(26));
        }
        String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
            "jurisdiction,examination_type,status,is_deleted) " +
            "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," +
            "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
            "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
            "," + "'" + user.getDeptId() + "'" +
            "," + "'" + user.getCardid() + "'" +
            "," + "'" + user.getJurisdiction() + "'" +
            "," + "'" + user.getExamination_type() + "'" +
            "," + "'" + user.getStatus() + "'" +
            "," + "'" + user.getIsDeleted() + "'" + ")";
//        if (null!=user.getAvatar() && !user.getAvatar().equals("")) {
//            user.setAvatar(FtpConfig.ip + user.getAvatar().substring(26));
//        }
//
//        String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
//            "jurisdiction,examination_type,status,is_deleted) " +
//            "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," +
//            "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
//            "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
//            "," + "'" + user.getDeptId() + "'" +
//            "," + "'" + user.getCardid() + "'" +
//            "," + "'" + user.getJurisdiction() + "'" +
//            "," + "'" + user.getExamination_type() + "'" +
//            "," + "'" + user.getStatus() + "'" +
//            "," + "'" + user.getIsDeleted() + "'" + ")";
//        System.out.println(s);
        FtpUtil.sqlFileUpload(s);
//        FtpUtil.sqlFileUpload(s);
        return R.status(status);
    }
}
};
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -143,7 +143,7 @@
            </foreach>
            )
        </if>
        ORDER BY id
        ORDER BY id desc
    </select>
    <select id="selectUserPagetxl" resultMap="userResultMaps">
src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -180,20 +180,7 @@
            user.setCardid(zc.getCardid());
            iUserService.saveOrUpdate(user);
            String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
                "jurisdiction,examination_type,status,is_deleted) " +
                "values(" + "'" + user.getId() + "'" + "," + "'" + "000000" + "'" + "," + "'" + user.getAccount() + "'" + "," +
                "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
                "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
                "," + "'" + user.getDeptId() + "'" +
                "," + "'" + user.getCardid() + "'" +
                "," + "'" + user.getJurisdiction() + "'" +
                "," + "'" + user.getExamination_type() + "'" +
                "," + "'" + user.getStatus() + "'" +
                "," + "'" + user.getIsDeleted() + "'" + ")";
            System.out.println(s);
            FtpUtil.sqlFileUpload(s);
        }
        return R.status(zcService.saveOrUpdate(zc));
    }
@@ -220,6 +207,23 @@
        String times = df.format(new Date());
        zc.setZctime(times);
        zcService.inster(zc);
        String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction,cardid)" +
            "values(" + zc.getId() + "'" +
            "," + "'" + zc.getUsername() + "'" +
            "," + "'" + zc.getPassword() + "'" +
            "," + "'" + zc.getSname() + "'" +
            "," + "'" + zc.getSex() + "'" +
            "," + "'" + zc.getPhone() + "'" +
            "," + "'" + zc.getZctime() + "'" +
            "," + "'" + zc.getDeptid() + "'" +
            "," + "'" + zc.getParentId() + "'" +
            "," + "'" + zc.getJurisdiction() + "'" +
            "," + "'" + zc.getCardid() + "'" + ")";
        System.out.println(s);
        FtpUtil.sqlFileUpload(s);
        return R.success("新增成功");
    }
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -16,6 +16,9 @@
        <result column="parent_id" property="parentId"/>
        <result column="jurisdiction" property="jurisdiction"/>
        <result column="cardid" property="cardid"/>
        <result column="examination_type" property="examination_type"/>
        <result column="examination_mx" property="examination_mx"/>
        <result column="audit_time" property="auditTime"/>
    </resultMap>
@@ -37,12 +40,15 @@
        <if test="zc.cardid != null and zc.cardid != '' ">
            and cardid like CONCAT('%',#{zc.cardid},'%')
        </if>
        and type != 1
        <if test="zc.examination_type != null and zc.examination_type != '' ">
            and examination_type = #{zc.examination_type}
        </if>
        and type != 1 ORDER BY zctime DESC
    </select>
    <!--注册新增-->
   <insert id="inster">
   <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>