feiyu02
2022-09-23 497475defd5d0ebf90ae6a8e2b080a16d78043ab
2022.9.23
已修改11个文件
已添加8个文件
434 ■■■■■ 文件已修改
pom.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/entity/UserInfoWx.java 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/EnElementSubType.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/mapper/UserInfoWxMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/OnLineQuestionServiceImpl.kt 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/UserinfoServiceImpl.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImpl.kt 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/LawService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/WxUserService.kt 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AccessTokenPW.kt 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AccessTokenWX.kt 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ConsultResultCaseVo.kt 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ConsultResultQAVo.kt 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/UserInfoWxMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -126,6 +126,13 @@
        <version>1.1.6</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.74</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
        <dependency>
            <groupId>net.coobird</groupId>
src/main/kotlin/cn/flightfeather/supervision/domain/entity/UserInfoWx.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,160 @@
package cn.flightfeather.supervision.domain.entity;
import javax.persistence.*;
@Table(name = "sm_t_userinfo_wx")
public class UserInfoWx {
    @Column(name = "UI_GUID")
    private String uiGuid;
    @Id
    @Column(name = "UI_Open_Id")
    private String uiOpenId;
    @Column(name = "UI_Nick_Name")
    private String uiNickName;
    @Column(name = "UI_Gender")
    private String uiGender;
    @Column(name = "UI_Country")
    private String uiCountry;
    @Column(name = "UI_Province")
    private String uiProvince;
    @Column(name = "UI_City")
    private String uiCity;
    @Column(name = "UI_Avatar_Url")
    private String uiAvatarUrl;
    @Column(name = "UI_UnionId")
    private String uiUnionid;
    /**
     * @return UI_GUID
     */
    public String getUiGuid() {
        return uiGuid;
    }
    /**
     * @param uiGuid
     */
    public void setUiGuid(String uiGuid) {
        this.uiGuid = uiGuid == null ? null : uiGuid.trim();
    }
    /**
     * @return UI_Open_Id
     */
    public String getUiOpenId() {
        return uiOpenId;
    }
    /**
     * @param uiOpenId
     */
    public void setUiOpenId(String uiOpenId) {
        this.uiOpenId = uiOpenId == null ? null : uiOpenId.trim();
    }
    /**
     * @return UI_Nick_Name
     */
    public String getUiNickName() {
        return uiNickName;
    }
    /**
     * @param uiNickName
     */
    public void setUiNickName(String uiNickName) {
        this.uiNickName = uiNickName == null ? null : uiNickName.trim();
    }
    /**
     * @return UI_Gender
     */
    public String getUiGender() {
        return uiGender;
    }
    /**
     * @param uiGender
     */
    public void setUiGender(String uiGender) {
        this.uiGender = uiGender == null ? null : uiGender.trim();
    }
    /**
     * @return UI_Country
     */
    public String getUiCountry() {
        return uiCountry;
    }
    /**
     * @param uiCountry
     */
    public void setUiCountry(String uiCountry) {
        this.uiCountry = uiCountry == null ? null : uiCountry.trim();
    }
    /**
     * @return UI_Province
     */
    public String getUiProvince() {
        return uiProvince;
    }
    /**
     * @param uiProvince
     */
    public void setUiProvince(String uiProvince) {
        this.uiProvince = uiProvince == null ? null : uiProvince.trim();
    }
    /**
     * @return UI_City
     */
    public String getUiCity() {
        return uiCity;
    }
    /**
     * @param uiCity
     */
    public void setUiCity(String uiCity) {
        this.uiCity = uiCity == null ? null : uiCity.trim();
    }
    /**
     * @return UI_Avatar_Url
     */
    public String getUiAvatarUrl() {
        return uiAvatarUrl;
    }
    /**
     * @param uiAvatarUrl
     */
    public void setUiAvatarUrl(String uiAvatarUrl) {
        this.uiAvatarUrl = uiAvatarUrl == null ? null : uiAvatarUrl.trim();
    }
    /**
     * @return UI_UnionId
     */
    public String getUiUnionid() {
        return uiUnionid;
    }
    /**
     * @param uiUnionid
     */
    public void setUiUnionid(String uiUnionid) {
        this.uiUnionid = uiUnionid == null ? null : uiUnionid.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/EnElementSubType.kt
@@ -72,7 +72,7 @@
            return if (value.toInt() == 99) {
                subTypes[index].last()
            } else {
                subTypes[index][value.toInt()]
                subTypes[index][value.toInt() - 1]
            }
        }
    }
src/main/kotlin/cn/flightfeather/supervision/domain/mapper/UserInfoWxMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.mapper
import cn.flightfeather.supervision.domain.entity.UserInfoWx
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface UserInfoWxMapper : MyMapper<UserInfoWx>
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt
@@ -99,4 +99,11 @@
                condition.isForeign, condition.category, condition.keywords,
                condition.isOpen, condition.isUsing, condition.count, condition.sceneTypeId)
    }
    override fun getSeries(userId: String, seriesId: String): List<LawsRegulations> {
        return lawsRegulationsMapper.selectByExample(Example(LawsRegulations::class.java).apply {
            createCriteria().andEqualTo("lrExtension2", seriesId)
            orderBy("lrExtension3")
        })
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/OnLineQuestionServiceImpl.kt
@@ -137,7 +137,7 @@
                    fileIndustry = IndustryType.getNameByValue(it.mfFileIndustry)
                    itemType = EnElementType.getNameByValue(it.mfEpItemType)
                    itemSubType = EnElementSubType.getNameByValue(it.mfEpItemSubtype)
                    itemSubType = EnElementSubType.getSubType(it.mfEpItemType, it.mfEpItemSubtype)
                    fileUrl = it.mfFileUrl
                    val keyList = it.mfKeywordLv1.split("、")
                    for (i in keyList.indices) {
@@ -247,7 +247,7 @@
//                    fileIndustry = IndustryType.getNameByValue(it.mfFileIndustry)
                    itemType = EnElementType.getNameByValue(it.cqKind)
                    itemSubType = EnElementSubType.getNameByValue(it.cqSubkind)
                    itemSubType = EnElementSubType.getSubType(it.cqKind, it.cqSubkind)
//                    fileUrl = it.mfFileUrl
//                    val keyList = it.mfKeywordLv1.split("、")
//                    for (i in keyList.indices) {
@@ -258,6 +258,10 @@
//                        }
//                    }
                    time = it.cqCreateTime
                    punish = it.cqIsPunish
                    illegal = it.cqIsIllegal
                    shotSpot = it.cqIsShotspot
                    supervise = it.cqIsSupervise
                })
            }
            response.success = true
@@ -296,7 +300,7 @@
//                    fileIndustry = IndustryType.getNameByValue(it.mfFileIndustry)
                    itemType = EnElementType.getNameByValue(it.ecEpItemType)
                    itemSubType = EnElementSubType.getNameByValue(it.ecEpItemSubtype)
                    itemSubType = EnElementSubType.getSubType(it.ecEpItemType, it.ecEpItemSubtype)
                    imgUrl = it.ecAppendixUrl?.split(";")?.get(0)
                    time = it.ecCreateTime
@@ -339,7 +343,7 @@
                mfMgtLevel = ManageLevelType.getNameByValue(it.mfMgtLevel)
                mfFileType = ConsultFileType.getNameByValue(it.mfFileType)
                mfEpItemType = EnElementType.getNameByValue(it.mfEpItemType)
                mfEpItemSubtype = EnElementSubType.getNameByValue(it.mfEpItemSubtype)
                mfEpItemSubtype = EnElementSubType.getSubType(it.mfEpItemType, it.mfEpItemSubtype)
                mfSaveType = FileSaveType.getNameByValue(it.mfSaveType)
            }
            result.add(vo)
@@ -356,7 +360,7 @@
                mfMgtLevel = ManageLevelType.getNameByValue(it.mfMgtLevel)
                mfFileType = ConsultFileType.getNameByValue(it.mfFileType)
                mfEpItemType = EnElementType.getNameByValue(it.mfEpItemType)
                mfEpItemSubtype = EnElementSubType.getNameByValue(it.mfEpItemSubtype)
                mfEpItemSubtype = EnElementSubType.getSubType(it.mfEpItemType, it.mfEpItemSubtype)
                mfSaveType = FileSaveType.getNameByValue(it.mfSaveType)
            }
        }
@@ -390,7 +394,7 @@
            BeanUtils.copyProperties(it, vo)
            vo.apply {
                cqKind = EnElementType.getNameByValue(it.cqKind)
                cqSubkind = EnElementSubType.getNameByValue(it.cqSubkind)
                cqSubkind = EnElementSubType.getSubType(it.cqKind, it.cqSubkind)
            }
            if (answers.isNotEmpty()) {
@@ -427,7 +431,7 @@
                typeId = ConsultResultType.TYPE4.value
                typeName = ConsultResultType.TYPE4.des
                itemType = EnElementType.getNameByValue(it.cqKind)
                itemSubType = EnElementSubType.getNameByValue(it.cqSubkind)
                itemSubType = EnElementSubType.getSubType(it.cqKind, it.cqSubkind)
                time = it.cqCreateTime
            })
@@ -435,7 +439,7 @@
//            BeanUtils.copyProperties(it, vo)
//            vo.apply {
//                cqKind = EnElementType.getNameByValue(it.cqKind)
//                cqSubkind = EnElementSubType.getNameByValue(it.cqSubkind)
//                cqSubkind = EnElementSubType.getSubType(it.ecEpItemType, it.cqSubkind)
//            }
//
//            if (answers.isNotEmpty()) {
@@ -453,7 +457,7 @@
            BeanUtils.copyProperties(it, result)
            result.apply {
                cqKind = EnElementType.getNameByValue(it.cqKind)
                cqSubkind = EnElementSubType.getNameByValue(it.cqSubkind)
                cqSubkind = EnElementSubType.getSubType(it.cqKind, it.cqSubkind)
            }
        }
@@ -481,7 +485,7 @@
            BeanUtils.copyProperties(it, vo)
            vo.apply {
                ecEpItemType = EnElementType.getNameByValue(it.ecEpItemType)
                ecEpItemSubtype = EnElementSubType.getNameByValue(it.ecEpItemSubtype)
                ecEpItemSubtype = EnElementSubType.getSubType(it.ecEpItemType, it.ecEpItemSubtype)
                ecType = EnforceCaseType.getNameByValue(it.ecType)
            }
            result.add(vo)
@@ -495,7 +499,7 @@
            BeanUtils.copyProperties(it, result)
            result.apply {
                ecEpItemType = EnElementType.getNameByValue(it.ecEpItemType)
                ecEpItemSubtype = EnElementSubType.getNameByValue(it.ecEpItemSubtype)
                ecEpItemSubtype = EnElementSubType.getSubType(it.ecEpItemType, it.ecEpItemSubtype)
                ecType = EnforceCaseType.getNameByValue(it.ecType)
            }
        }
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/UserinfoServiceImpl.kt
@@ -1,14 +1,18 @@
package cn.flightfeather.supervision.lightshare.service.Impl
import cn.flightfeather.supervision.common.net.WXHttpService
import cn.flightfeather.supervision.domain.entity.BaseInfo
import cn.flightfeather.supervision.domain.entity.Company
import cn.flightfeather.supervision.domain.entity.UserInfoWx
import cn.flightfeather.supervision.domain.entity.Userinfo
import cn.flightfeather.supervision.domain.enumeration.SceneType
import cn.flightfeather.supervision.domain.enumeration.UserType
import cn.flightfeather.supervision.domain.mapper.*
import cn.flightfeather.supervision.infrastructure.utils.FileUtil
import cn.flightfeather.supervision.infrastructure.utils.UUIDGenerator
import cn.flightfeather.supervision.lightshare.service.UserinfoService
import cn.flightfeather.supervision.lightshare.vo.*
import com.alibaba.fastjson.JSONObject
import com.github.pagehelper.PageHelper
import org.springframework.beans.BeanUtils
import org.springframework.stereotype.Service
@@ -25,7 +29,7 @@
    val companyMapper: CompanyMapper,
    val restaurantBaseInfoMapper: RestaurantBaseInfoMapper,
    val vehicleBaseInfoMapper: VehicleBaseInfoMapper,
    val userMapMapper: UserMapMapper
    val userMapMapper: UserMapMapper,
) : UserinfoService {
    //根据userinfo条件查询
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImpl.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,88 @@
package cn.flightfeather.supervision.lightshare.service.Impl
import cn.flightfeather.supervision.common.net.WXHttpService
import cn.flightfeather.supervision.domain.entity.UserInfoWx
import cn.flightfeather.supervision.domain.entity.Userinfo
import cn.flightfeather.supervision.domain.entity.Version
import cn.flightfeather.supervision.domain.enumeration.UserType
import cn.flightfeather.supervision.domain.mapper.UserInfoWxMapper
import cn.flightfeather.supervision.domain.mapper.UserinfoMapper
import cn.flightfeather.supervision.domain.mapper.VersionMapper
import cn.flightfeather.supervision.infrastructure.utils.FileUtil
import cn.flightfeather.supervision.infrastructure.utils.UUIDGenerator
import cn.flightfeather.supervision.lightshare.service.VersionService
import cn.flightfeather.supervision.lightshare.service.WxUserService
import cn.flightfeather.supervision.lightshare.vo.AccessTokenPW
import cn.flightfeather.supervision.lightshare.vo.AccessTokenWX
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import cn.flightfeather.supervision.lightshare.vo.VersionVo
import com.alibaba.fastjson.JSONObject
import org.springframework.stereotype.Service
import org.springframework.web.multipart.MultipartFile
import tk.mybatis.mapper.entity.Example
@Service
class WxUserServiceImpl(val userinfoMapper: UserinfoMapper, val userInfoWxMapper: UserInfoWxMapper): WxUserService {
    override fun loginWx(accessTokenWX: AccessTokenWX): BaseResponse<Userinfo> {
        accessTokenWX.code ?: return BaseResponse(false, "登录凭证不能为空")
        val res = WXHttpService.code2Session(accessTokenWX.code!!)
//        return BaseResponse(false)
        if (res.success) {
            val json = JSONObject.parseObject(res.m.responseBodyAsString)
            if (json["errcode"] == 0 || json["errcode"] == null) {
                val openid = json["openid"] as String
                val unionid = json["unionid"] as String
                val user = userInfoWxMapper.selectByPrimaryKey(openid)
                return if (user.uiOpenId == null) {
                    val newUserWx = UserInfoWx().apply {
//                        uiGuid = UUIDGenerator.generate16ShortUUID()
                        uiOpenId = openid
                        uiNickName = accessTokenWX.nickName
                        uiGender
                        uiCountry
                        uiProvince
                        uiCity
                        uiAvatarUrl = accessTokenWX.avatarUrl
                        uiUnionid = unionid
                    }
//                    val newUser = Userinfo().apply {
//                        guid = newUserWx.uiGuid
//                        headIconUrl = newUserWx.uiAvatarUrl
//                        acountname
//                        realname = newUserWx.uiNickName
//                        password
//                        usertypeid = UserType.Enterprise.value.toByte()
//                        usertype = UserType.Enterprise.des
//                        isenable = true
//                        wechatid = newUserWx.uiOpenId
//                    }
                    var r = userInfoWxMapper.insert(newUserWx)
//                    r += userinfoMapper.insert(newUser)
                    return if (r == 1) {
                        BaseResponse(true, "微信用户注册成功")
                    } else {
                        BaseResponse(false, "微信用户注册失败")
                    }
                } else {
                    if (user.uiGuid != null) {
                        val userinfo = userinfoMapper.selectByPrimaryKey(user.uiGuid)
                        BaseResponse(true, "微信用户登录成功", data = userinfo)
                    } else {
                        BaseResponse(true, "微信用户未绑定企业")
                    }
                }
            } else {
                return BaseResponse(false, "请求失败:errcode=${json["errcode"]}")
            }
        } else {
            return BaseResponse(false, "请求失败, æ— æ³•访问微信接口")
        }
    }
    override fun loginPw(accessTokenPW: AccessTokenPW): BaseResponse<Userinfo> {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/LawService.kt
@@ -15,4 +15,6 @@
    fun getLawsRegulations(condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations>
    fun getLawsRegulationsWithEachType(condition: LawsRegulationsCondition): List<LawsRegulations>
    fun getSeries(userId: String, seriesId: String): List<LawsRegulations>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt
@@ -20,6 +20,7 @@
    fun login(loginRequestVo: LoginRequestVo): AccessToken
    fun register(loginRequestVo: LoginRequestVo): AccessToken
    fun register2(loginRequestVo: LoginRequestVo): AccessToken
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/WxUserService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.entity.Userinfo
import cn.flightfeather.supervision.lightshare.vo.AccessTokenPW
import cn.flightfeather.supervision.lightshare.vo.AccessTokenWX
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
interface WxUserService {
    /**
     * å¾®ä¿¡ç”¨æˆ·æ³¨å†Œå’Œç™»å½•
     */
    fun loginWx(accessTokenWX: AccessTokenWX): BaseResponse<Userinfo>
    fun loginPw(accessTokenPW: AccessTokenPW): BaseResponse<Userinfo>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AccessTokenPW.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package cn.flightfeather.supervision.lightshare.vo
import com.fasterxml.jackson.annotation.JsonInclude
/**
 * å¾®ä¿¡ç”¨æˆ·å¯†ç ç™»å½•信息
 */
class AccessTokenPW : AccessTokenWX() {
    var userName: String? = null
    var password: String? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AccessTokenWX.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package cn.flightfeather.supervision.lightshare.vo
import com.fasterxml.jackson.annotation.JsonInclude
/**
 * å¾®ä¿¡ç”¨æˆ·ä¸€é”®ç™»å½•登录信息
 */
open class AccessTokenWX {
    //用户登录凭证
    var code: String? = null
    //不包含敏感信息的原始数据字符串,用于计算签名
    var rawData: String? = null
    var signature: String? = null
    var encryptedData: String? = null
    var iv: String? = null
    var nickName: String? = null
    var avatarUrl: String? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ConsultResultCaseVo.kt
@@ -11,16 +11,16 @@
    var provinceName: String? = null
    var cityName: String? = null
    var occurDate: String? = null
    //是否设计行政处罚
    //是否涉及行政处罚
    var punish: Boolean = false
    //是否设计行政拘留
    //是否涉及行政拘留
    var detained: Boolean = false
    //是否设计刑事责任
    //是否涉及刑事责任
    var illegal: Boolean = false
    //是否设计环保热点
    //是否涉及环保热点
    var shotSpot: Boolean = false
    //是否设计督察要点
    //是否涉及督察要点
    var supervise: Boolean = false
    //是否设计行政处罚轻微违法
    //是否涉及行政处罚轻微违法
    var minor: Boolean = false
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ConsultResultQAVo.kt
@@ -9,5 +9,12 @@
 */
class ConsultResultQAVo : ConsultResultVo() {
//    val answer: String? = null
    //是否涉及行政处罚
    var punish: Boolean = false
    //是否涉及刑事责任
    var illegal: Boolean = false
    //是否涉及环保热点
    var shotSpot: Boolean = false
    //是否涉及督察要点
    var supervise: Boolean = false
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt
@@ -43,4 +43,11 @@
        @ApiParam(value = "用户id") @PathVariable userId: String,
        @ApiParam(value = "查找条件") @RequestBody condition: LawsRegulationsCondition
    ) = lawService.getLawsRegulationsWithEachType(condition)
    @ApiOperation(value = "查询资源所在系列")
    @PostMapping("/series")
    fun getSeries(
        @ApiParam(value = "用户id") @RequestParam userId: String,
        @ApiParam(value = "查找条件") @RequestParam(value = "seriesId") seriesId: String,
    ) = lawService.getSeries(userId, seriesId)
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.lightshare.service.WxUserService
import cn.flightfeather.supervision.lightshare.vo.AccessTokenWX
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@Api(tags = ["微信用户信息API接口"])
@RestController
@RequestMapping("/wxuser")
class WxUserController(val wxUserService: WxUserService) {
    @ApiOperation(value = "登录")
    @PostMapping("/loginWx")
    fun loginWx(
        @ApiParam("登录信息") @RequestBody accessTokenWX: AccessTokenWX
    ) = wxUserService.loginWx(accessTokenWX)
}
src/main/resources/generator/generatorConfig.xml
@@ -90,7 +90,9 @@
<!--               selectByExampleQueryId="false"/>-->
<!--        <table tableName="epk_t_settinganswer" domainObjectName="SettingAnswer" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
<!--               selectByExampleQueryId="false"/>-->
        <table tableName="epk_t_enforcecase" domainObjectName="EnforceCase" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
<!--        <table tableName="epk_t_enforcecase" domainObjectName="EnforceCase" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
<!--               selectByExampleQueryId="false"/>-->
        <table tableName="sm_t_userinfo_wx" domainObjectName="UserInfoWx" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
               selectByExampleQueryId="false"/>
    </context>
</generatorConfiguration>
src/main/resources/mapper/UserInfoWxMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
<?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="cn.flightfeather.supervision.domain.mapper.UserInfoWxMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.UserInfoWx" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="UI_Open_Id" property="uiOpenId" jdbcType="VARCHAR" />
    <result column="UI_GUID" property="uiGuid" jdbcType="VARCHAR" />
    <result column="UI_Nick_Name" property="uiNickName" jdbcType="VARCHAR" />
    <result column="UI_Gender" property="uiGender" jdbcType="VARCHAR" />
    <result column="UI_Country" property="uiCountry" jdbcType="VARCHAR" />
    <result column="UI_Province" property="uiProvince" jdbcType="VARCHAR" />
    <result column="UI_City" property="uiCity" jdbcType="VARCHAR" />
    <result column="UI_Avatar_Url" property="uiAvatarUrl" jdbcType="VARCHAR" />
    <result column="UI_UnionId" property="uiUnionid" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    UI_GUID, UI_Open_Id, UI_Nick_Name, UI_Gender, UI_Country, UI_Province, UI_City, UI_Avatar_Url,
    UI_UnionId
  </sql>
</mapper>