Commit 79fb1449 by 阮思源

修改下

parent 3f86ad40
...@@ -1093,7 +1093,7 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -1093,7 +1093,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
ownAltQrcodeInfoDTO.setAltQrcodeUrl(selfRobotDTO.getQrcodeUrl()); ownAltQrcodeInfoDTO.setAltQrcodeUrl(selfRobotDTO.getQrcodeUrl());
ownAltQrcodeInfoDTO.setAltHeadUrl(selfRobotDTO.getHeadPic()); ownAltQrcodeInfoDTO.setAltHeadUrl(selfRobotDTO.getHeadPic());
//获取之前是否有没有使用的暗号 //获取之前是否有没有使用的暗号
JoinGroupCipher joinGroupCipher = joinGroupCipherDao.getByCreateUser(wechatUserId, classifyId); JoinGroupCipher joinGroupCipher = joinGroupCipherDao.getByWechatUserId(wechatUserId, classifyId);
String cipher; String cipher;
if (joinGroupCipher != null) { if (joinGroupCipher != null) {
cipher = joinGroupCipher.getCipher(); cipher = joinGroupCipher.getCipher();
...@@ -1107,7 +1107,7 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -1107,7 +1107,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
} }
JoinGroupCipher joinGroupCipherNew = new JoinGroupCipher(); JoinGroupCipher joinGroupCipherNew = new JoinGroupCipher();
joinGroupCipherNew.setCipher(cipher); joinGroupCipherNew.setCipher(cipher);
joinGroupCipherNew.setCreateUser(wechatUserId); joinGroupCipherNew.setWechatUserId(wechatUserId);
joinGroupCipherNew.setClassifyId(classifyId); joinGroupCipherNew.setClassifyId(classifyId);
joinGroupCipherDao.insert(joinGroupCipherNew); joinGroupCipherDao.insert(joinGroupCipherNew);
} }
......
...@@ -4,7 +4,7 @@ import com.pcloud.book.group.entity.JoinGroupCipher; ...@@ -4,7 +4,7 @@ import com.pcloud.book.group.entity.JoinGroupCipher;
import com.pcloud.common.core.dao.BaseDao; import com.pcloud.common.core.dao.BaseDao;
public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> { public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
JoinGroupCipher getByCreateUser(Long wechatUserId,Long classifyId); JoinGroupCipher getByWechatUserId(Long wechatUserId,Long classifyId);
JoinGroupCipher getByCipher(String cipher); JoinGroupCipher getByCipher(String cipher);
......
...@@ -16,11 +16,11 @@ import java.util.Map; ...@@ -16,11 +16,11 @@ import java.util.Map;
@Component("joinGroupCipherDao") @Component("joinGroupCipherDao")
public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> implements JoinGroupCipherDao { public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> implements JoinGroupCipherDao {
@Override @Override
public JoinGroupCipher getByCreateUser(Long wechatUserId,Long classifyId) { public JoinGroupCipher getByWechatUserId(Long wechatUserId,Long classifyId) {
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
map.put("wechatUserId",wechatUserId); map.put("wechatUserId",wechatUserId);
map.put("classifyId",classifyId); map.put("classifyId",classifyId);
return this.getSqlSession().selectOne(this.getStatement("getByCreateUser"), map); return this.getSqlSession().selectOne(this.getStatement("getByWechatUserId"), map);
} }
@Override @Override
......
...@@ -18,7 +18,7 @@ public class JoinGroupCipher extends BaseEntity { ...@@ -18,7 +18,7 @@ public class JoinGroupCipher extends BaseEntity {
private Long classifyId; private Long classifyId;
@ApiModelProperty("创建人") @ApiModelProperty("创建人")
private Long createUser; private Long wechatUserId;
@ApiModelProperty("使用人微信id") @ApiModelProperty("使用人微信id")
private String wxId; private String wxId;
...@@ -42,12 +42,12 @@ public class JoinGroupCipher extends BaseEntity { ...@@ -42,12 +42,12 @@ public class JoinGroupCipher extends BaseEntity {
this.classifyId = classifyId; this.classifyId = classifyId;
} }
public Long getCreateUser() { public Long getWechatUserId() {
return createUser; return wechatUserId;
} }
public void setCreateUser(Long createUser) { public void setWechatUserId(Long wechatUserId) {
this.createUser = createUser; this.wechatUserId = wechatUserId;
} }
public String getWxId() { public String getWxId() {
...@@ -71,7 +71,7 @@ public class JoinGroupCipher extends BaseEntity { ...@@ -71,7 +71,7 @@ public class JoinGroupCipher extends BaseEntity {
return "JoinGroupCipher{" + return "JoinGroupCipher{" +
"cipher='" + cipher + '\'' + "cipher='" + cipher + '\'' +
", classifyId=" + classifyId + ", classifyId=" + classifyId +
", createUser=" + createUser + ", wechatUserId=" + wechatUserId +
", wxId='" + wxId + '\'' + ", wxId='" + wxId + '\'' +
", hasUsed=" + hasUsed + ", hasUsed=" + hasUsed +
"} " + super.toString(); "} " + super.toString();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<id column="id" property="id" jdbcType="BIGINT"/> <id column="id" property="id" jdbcType="BIGINT"/>
<result column="cipher" property="cipher" jdbcType="VARCHAR"/> <result column="cipher" property="cipher" jdbcType="VARCHAR"/>
<result column="classify_id" property="classifyId" jdbcType="BIGINT"/> <result column="classify_id" property="classifyId" jdbcType="BIGINT"/>
<result column="create_user" property="createUser" jdbcType="BIGINT"/> <result column="wechat_user_id" property="wechatUserId" jdbcType="BIGINT"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="wx_id" property="wxId" jdbcType="BIGINT"/> <result column="wx_id" property="wxId" jdbcType="BIGINT"/>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, cipher, classify_id, create_time, create_user, update_time, wx_id, has_used id, cipher, classify_id, create_time, wechat_user_id, update_time, wx_id, has_used
</sql> </sql>
<insert id="insert" parameterType="com.pcloud.book.group.entity.JoinGroupCipher" useGeneratedKeys="true" <insert id="insert" parameterType="com.pcloud.book.group.entity.JoinGroupCipher" useGeneratedKeys="true"
...@@ -23,22 +23,22 @@ ...@@ -23,22 +23,22 @@
cipher, cipher,
classify_id, classify_id,
create_time, create_time,
create_user, wechat_user_id,
has_used has_used
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{cipher,jdbcType=BIGINT}, #{cipher,jdbcType=BIGINT},
#{classifyId,jdbcType=BIGINT}, #{classifyId,jdbcType=BIGINT},
now(), now(),
#{createUser,jdbcType=BIGINT}, #{wechatUserId,jdbcType=BIGINT},
0 0
</trim> </trim>
</insert> </insert>
<!--获取基本信息--> <!--获取基本信息-->
<select id="getByCreateUser" parameterType="map" resultMap="BaseResultMap"> <select id="getByWechatUserId" parameterType="map" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> from join_group_cipher select <include refid="Base_Column_List"/> from join_group_cipher
where create_user=#{wechatUserId} and where wechat_user_id=#{wechatUserId} and
classify_id=#{classifyId} classify_id=#{classifyId}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment