Merge remote-tracking branch 'origin/master' into xinghong-dev
| | |
| | | |
| | | private long votedCount; // 已投票人数 |
| | | |
| | | private String ownerName; |
| | | |
| | | private String link; |
| | | |
| | | private String roomName; |
| | | |
| | | private List<QuestionTitleValueDto> titleValues; |
| | | |
| | | private String state; |
| | | |
| | | private String userQaId; |
| | | |
| | | public String getQaName() { |
| | | return qaName; |
| | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | |
| | | public String getLink() { |
| | | return link; |
| | | } |
| | | |
| | | public void setLink(String link) { |
| | | this.link = link; |
| | | } |
| | | |
| | | public String getRoomName() { |
| | | return roomName; |
| | | } |
| | | |
| | | public void setRoomName(String roomName) { |
| | | this.roomName = roomName; |
| | | } |
| | | |
| | | public String getUserQaId() { |
| | | return userQaId; |
| | | } |
| | | |
| | | public void setUserQaId(String userQaId) { |
| | | this.userQaId = userQaId; |
| | | } |
| | | } |
| | |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String qaId; |
| | | |
| | | |
| | | public String getTitleType() { |
| | | return titleType; |
| | |
| | | public void setTitleValues(List<QuestionTitleValueDto> titleValues) { |
| | | this.titleValues = titleValues; |
| | | } |
| | | |
| | | public String getQaId() { |
| | | return qaId; |
| | | } |
| | | |
| | | public void setQaId(String qaId) { |
| | | this.qaId = qaId; |
| | | } |
| | | } |
| | |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String qaType; |
| | | |
| | | private List<UserQuestionAnswerValueDto> values; |
| | | |
| | | |
| | |
| | | public void setValues(List<UserQuestionAnswerValueDto> values) { |
| | | this.values = values; |
| | | } |
| | | |
| | | public String getQaType() { |
| | | return qaType; |
| | | } |
| | | |
| | | public void setQaType(String qaType) { |
| | | this.qaType = qaType; |
| | | } |
| | | } |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.po.user; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import java.util.Date; |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | public class UserQuestionAnswerValuePo implements Serializable { |
| | | |
| | | private String score; |
| | | private String valueId; |
| | | private String titleId; |
| | | private String answerType; |
| | | private String objId; |
| | | private String userQaId; |
| | | private String valueContent; |
| | | private String personId; |
| | | private String statusCd = "0"; |
| | | private String objType; |
| | | private String userTitleId; |
| | | private String qaId; |
| | | |
| | | public String getScore() { |
| | | return score; |
| | | } |
| | | |
| | | public void setScore(String score) { |
| | | this.score = score; |
| | | } |
| | | |
| | | public String getValueId() { |
| | | private String titleId; |
| | | private String userQaId; |
| | | private String valueContent; |
| | | private String statusCd = "0"; |
| | | private String communityId; |
| | | private String userTitleId; |
| | | private String qaId; |
| | | public String getValueId() { |
| | | return valueId; |
| | | } |
| | | |
| | | public void setValueId(String valueId) { |
| | | public void setValueId(String valueId) { |
| | | this.valueId = valueId; |
| | | } |
| | | |
| | | public String getTitleId() { |
| | | public String getTitleId() { |
| | | return titleId; |
| | | } |
| | | |
| | | public void setTitleId(String titleId) { |
| | | public void setTitleId(String titleId) { |
| | | this.titleId = titleId; |
| | | } |
| | | |
| | | public String getAnswerType() { |
| | | return answerType; |
| | | } |
| | | |
| | | public void setAnswerType(String answerType) { |
| | | this.answerType = answerType; |
| | | } |
| | | |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | |
| | | public String getUserQaId() { |
| | | public String getUserQaId() { |
| | | return userQaId; |
| | | } |
| | | |
| | | public void setUserQaId(String userQaId) { |
| | | public void setUserQaId(String userQaId) { |
| | | this.userQaId = userQaId; |
| | | } |
| | | |
| | | public String getValueContent() { |
| | | public String getValueContent() { |
| | | return valueContent; |
| | | } |
| | | |
| | | public void setValueContent(String valueContent) { |
| | | public void setValueContent(String valueContent) { |
| | | this.valueContent = valueContent; |
| | | } |
| | | |
| | | public String getPersonId() { |
| | | return personId; |
| | | } |
| | | |
| | | public void setPersonId(String personId) { |
| | | this.personId = personId; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getObjType() { |
| | | return objType; |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getUserTitleId() { |
| | | public String getUserTitleId() { |
| | | return userTitleId; |
| | | } |
| | | |
| | | public void setUserTitleId(String userTitleId) { |
| | | public void setUserTitleId(String userTitleId) { |
| | | this.userTitleId = userTitleId; |
| | | } |
| | | |
| | | public String getQaId() { |
| | | public String getQaId() { |
| | | return qaId; |
| | | } |
| | | |
| | | public void setQaId(String qaId) { |
| | | public void setQaId(String qaId) { |
| | | this.qaId = qaId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.data.redis.cache.RedisCacheManager; |
| | | import org.springframework.data.redis.connection.RedisConnectionFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; |
| | | import org.springframework.data.redis.serializer.RedisSerializationContext; |
| | | import org.springframework.data.redis.serializer.*; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | import redis.clients.jedis.HostAndPort; |
| | | import redis.clients.jedis.JedisCluster; |
| | |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Bean |
| | | public RedisTemplate<String,Object> redisTemplate(RedisConnectionFactory factory){ |
| | | RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>(); |
| | | redisTemplate.setConnectionFactory(factory); |
| | | redisTemplate.setKeySerializer(new StringRedisSerializer()); // key的序列化类型 |
| | | redisTemplate.setHashKeySerializer(new StringRedisSerializer()); |
| | | redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer()); // value的序列化类型 |
| | | redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer()); |
| | | redisTemplate.afterPropertiesSet(); |
| | | return redisTemplate; |
| | | } |
| | | |
| | | //@Bean(name = "jedisPool") |
| | | //@Autowired |
| | | public JedisPool jedisPool(@Qualifier("jedis.pool.config") JedisPoolConfig config, |
| | |
| | | } |
| | | |
| | | |
| | | // @Bean(name = "jedisCluster") |
| | | // @Bean(name = "jedisCluster") |
| | | // @Autowired |
| | | public JedisCluster jedisCluster(@Qualifier("jedis.pool.config") JedisPoolConfig config, |
| | | @Value("${jedis.pool.host}") String host, |
| | |
| | | return config; |
| | | } |
| | | |
| | | @Bean |
| | | public RedisSerializer<String> redisKeySerializer(){ |
| | | return new StringRedisSerializer(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Bean |
| | |
| | | return cm; |
| | | } |
| | | |
| | | /** |
| | | * @return |
| | | * @Cacheable和通过RedisTemplate之间去相互获取数据 |
| | | * @Cacheable注解存储redis缓存数据和通过RedisTemplate去获取存储的数据,由于@Cacheable默认的序列化编码存储到数据为byte类型,而RedisTemplate的默认编码为JdkSerializationRedisSerializer,所以要通过设置同一个序列化方式去解决问题; 通过继承CachingConfigurerSupport并且开启@EnableCaching去设置cache的配置通过RedisCacheConfiguration.defaultCacheConfig()去设置序列化的方式RedisTemplate<String, Object>设置RedisTemplate的序列化方式 |
| | | * 设置序列化方式Jackson2JsonRedisSerializer |
| | | */ |
| | | @Bean |
| | | public RedisCacheConfiguration redisCacheConfiguration() { |
| | | |
| | | RedisCacheConfiguration configuration = RedisCacheConfiguration.defaultCacheConfig(); |
| | | |
| | | configuration = configuration.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer())).entryTtl(Duration.ofSeconds(30)); |
| | | |
| | | configuration = configuration.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new JdkSerializationRedisSerializer())).entryTtl(Duration.ofSeconds(30)); |
| | | return configuration; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public String set(byte[] key, byte[] value) { |
| | | redisTemplate.opsForValue().set(key, value); |
| | | redisTemplate.opsForValue().set(new String(key), value); |
| | | return ""; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public byte[] get(byte[] key) { |
| | | Object value = redisTemplate.opsForValue().get(key); |
| | | Object value = redisTemplate.opsForValue().get(new String(key)); |
| | | if (value == null) { |
| | | return null; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Long del(byte[] key) { |
| | | redisTemplate.delete(key); |
| | | redisTemplate.delete(new String(key)); |
| | | return 1L; |
| | | } |
| | | |
| | |
| | | feeName,t.payment_cycle paymentCycle,t.start_time startTime,t.end_time |
| | | endTime,t.community_id communityId,t.deduct_from deductFrom, |
| | | t.pay_online payOnline,t.scale,t.decimal_place decimalPlace,t.units,t.b_id bId, |
| | | td1.name feeTypeCdName,td2.name feeFlagName,td3.name billTypeName,td4.name computingFormulaName, |
| | | uu.`name` userName |
| | | from business_pay_fee_config t |
| | | left join c_business cb on t.b_id = cb.b_id |
| | | left join c_orders co on cb.o_id = co.o_id |
| | | left join u_user uu on co.user_id = uu.user_id |
| | | left join t_dict td1 on t.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and |
| | | td1.table_columns = 'fee_type_cd' |
| | | left join t_dict td2 on t.fee_flag = td2.status_cd and td2.table_name = 'pay_fee_config' and td2.table_columns = |
| | | 'fee_flag' |
| | | left join t_dict td3 on t.bill_type = td3.status_cd and td3.table_name = 'pay_fee_config' and td3.table_columns |
| | | = 'bill_type' |
| | | left join t_dict td4 on t.computing_formula = td4.status_cd and td4.table_name = 'pay_fee_config' and |
| | | td4.table_columns = 'computing_formula' |
| | | where 1=1 |
| | | and t.config_id = #{configId} |
| | | and t.community_id = #{communityId} |
| | |
| | | left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and |
| | | d.table_columns="prime_rate" |
| | | where t.status_cd = '0' |
| | | and pfdd.discount_price> 0 |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | |
| | | select t.title_type,t.title_type titleType,t.title_id,t.title_id titleId,t.status_cd,t.status_cd |
| | | statusCd,t.community_id,t.community_id communityId,t.qa_title,t.qa_title qaTitle,t.create_time createTime |
| | | from question_title t |
| | | <if test="qaId !=null and qaId != ''"> |
| | | left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0' |
| | | </if> |
| | | where 1 =1 |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and qatr.qa_id = #{qaId} |
| | | </if> |
| | | <if test="titleType !=null and titleType != ''"> |
| | | and t.title_type= #{titleType} |
| | | </if> |
| | |
| | | <select id="queryQuestionTitlesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from question_title t |
| | | <if test="qaId !=null and qaId != ''"> |
| | | left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0' |
| | | </if> |
| | | where 1 =1 |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and qatr.qa_id = #{qaId} |
| | | </if> |
| | | <if test="titleType !=null and titleType != ''"> |
| | | and t.title_type= #{titleType} |
| | | </if> |
| | |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | <select id="queryOwnerQuestionAnswers" parameterType="Map" resultType="Map"> |
| | | select qa.qa_name qaName,qa.qa_type qaType,qa.start_time startTime,qa.end_time endTime,qa.remark, |
| | | qa.community_id communityId,qa.qa_id qaId,td.`name` qaTypeName,qa.content, |
| | | t.owner_name ownerName,t.link,t.room_name roomName,t.user_qa_id userQaId |
| | | from user_question_answer t |
| | | left join question_answer qa on t.qa_id = qa.qa_id and qa.status_cd = '0' |
| | | LEFT JOIN t_dict td on td.status_cd = qa.qa_type and td.table_name = 'question_answer' and td.table_columns = 'qa_type' |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and t.community_id = #{communityId} |
| | | and t.link = #{link} |
| | | and qa.qa_type = #{qaType} |
| | | and qa.state = 'C' |
| | | and qa.start_time < NOW() |
| | | and qa.end_time > NOW() |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="userQuestionAnswerValueV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存问卷答案信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveUserQuestionAnswerValueInfo" parameterType="Map"> |
| | | insert into user_question_answer_value( |
| | | value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id |
| | | ) values ( |
| | | #{valueId},#{titleId},#{userQaId},#{valueContent},#{communityId},#{userTitleId},#{qaId} |
| | | ) |
| | | value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id |
| | | ) values ( |
| | | #{valueId},#{titleId},#{userQaId},#{valueContent},#{communityId},#{userTitleId},#{qaId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <insert id="saveUserQuestionAnswerValues" parameterType="Map"> |
| | | insert into user_question_answer_value( |
| | | value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id |
| | | ) values |
| | | <foreach collection="userUserQuestionAnswerValues" item="item" separator=","> |
| | | (#{item.valueId},#{item.titleId},#{item.userQaId},#{item.valueContent},#{item.communityId},#{item.userTitleId},#{item.qaId}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!-- 查询问卷答案信息 add by wuxw 2018-07-03 --> |
| | | <select id="getUserQuestionAnswerValueInfo" parameterType="Map" resultType="Map"> |
| | | select t.value_id,t.value_id valueId,t.title_id,t.title_id titleId,t.user_qa_id,t.user_qa_id userQaId,t.value_content,t.value_content valueContent,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.user_title_id,t.user_title_id userTitleId,t.qa_id,t.qa_id qaId |
| | | from user_question_answer_value t |
| | | where 1 =1 |
| | | <if test="valueId !=null and valueId != ''"> |
| | | and t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | and t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | and t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | and t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | select t.value_id,t.value_id valueId,t.title_id,t.title_id titleId,t.user_qa_id,t.user_qa_id |
| | | userQaId,t.value_content,t.value_content valueContent,t.status_cd,t.status_cd |
| | | statusCd,t.community_id,t.community_id communityId,t.user_title_id,t.user_title_id userTitleId,t.qa_id,t.qa_id |
| | | qaId |
| | | from user_question_answer_value t |
| | | where 1 =1 |
| | | <if test="valueId !=null and valueId != ''"> |
| | | and t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | and t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | and t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | and t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改问卷答案信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateUserQuestionAnswerValueInfo" parameterType="Map"> |
| | | update user_question_answer_value t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="valueId !=null and valueId != ''"> |
| | | , t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | , t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | , t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | , t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | , t.qa_id= #{qaId} |
| | | </if> |
| | | where 1=1 <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | update user_question_answer_value t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="valueId !=null and valueId != ''"> |
| | | , t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | , t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | , t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | , t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | , t.qa_id= #{qaId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询问卷答案数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryUserQuestionAnswerValuesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from user_question_answer_value t |
| | | where 1 =1 |
| | | <if test="valueId !=null and valueId != ''"> |
| | | and t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | and t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | and t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | and t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | | </if> |
| | | <select id="queryUserQuestionAnswerValuesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from user_question_answer_value t |
| | | where 1 =1 |
| | | <if test="valueId !=null and valueId != ''"> |
| | | and t.value_id= #{valueId} |
| | | </if> |
| | | <if test="titleId !=null and titleId != ''"> |
| | | and t.title_id= #{titleId} |
| | | </if> |
| | | <if test="userQaId !=null and userQaId != ''"> |
| | | and t.user_qa_id= #{userQaId} |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | and t.value_content= #{valueContent} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userTitleId !=null and userTitleId != ''"> |
| | | and t.user_title_id= #{userTitleId} |
| | | </if> |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package com.java110.intf.user; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.questionAnswer.QuestionAnswerDto; |
| | | import com.java110.dto.user.UserQuestionAnswerDto; |
| | | import com.java110.po.user.UserQuestionAnswerPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | int queryUserQuestionAnswersCount(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto); |
| | | |
| | | |
| | | /** |
| | | * 查询业主需要投票 |
| | | * @param userQuestionAnswerDto |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/queryOwnerQuestionAnswers", method = RequestMethod.POST) |
| | | List<QuestionAnswerDto> queryOwnerQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto); |
| | | } |
| | |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.user.UserQuestionAnswerValueDto; |
| | | import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo; |
| | | import com.java110.po.user.UserQuestionAnswerValuePo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @RequestMapping(value = "/saveUserQuestionAnswerValue", method = RequestMethod.POST) |
| | | public int saveUserQuestionAnswerValue(@RequestBody UserQuestionAnswerValuePo userQuestionAnswerValuePo); |
| | | |
| | | @RequestMapping(value = "/saveUserQuestionAnswerValues", method = RequestMethod.POST) |
| | | int saveUserQuestionAnswerValues(@RequestBody List<UserQuestionAnswerValuePo> tmpUserUserQuestionAnswerValues); |
| | | |
| | | @RequestMapping(value = "/updateUserQuestionAnswerValue", method = RequestMethod.POST) |
| | | public int updateUserQuestionAnswerValue(@RequestBody UserQuestionAnswerValuePo userQuestionAnswerValuePo); |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryUserQuestionAnswerValuesCount", method = RequestMethod.POST) |
| | | int queryUserQuestionAnswerValuesCount(@RequestBody UserQuestionAnswerValueDto userQuestionAnswerValueDto); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | reqJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId)); |
| | | reqJson.put("isDefault", "F"); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | if (day < 1) { |
| | | day = 1; |
| | | } |
| | | dayReceivableAmount = receivableAmount.divide(new BigDecimal(day), 4, BigDecimal.ROUND_HALF_UP);// 日 应收 |
| | | dayReceivableAmount = receivableAmount.divide(new BigDecimal(day), 8, BigDecimal.ROUND_HALF_UP);// 日 应收 |
| | | } |
| | | |
| | | // todo 寻找第一个自然月 一日 |
| | |
| | | curMonthMaxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); |
| | | |
| | | // todo 如果不是整月,则转换为按天计算 |
| | | if (curDay != curMonthMaxDay) { |
| | | // if (curDay != curMonthMaxDay) { |
| | | //todo 周期性费用 日应收重新算 |
| | | if (!FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) { |
| | | dayReceivableAmount = receivableAmount.divide(new BigDecimal(curMonthMaxDay), 4, BigDecimal.ROUND_HALF_UP);// 日 实收 |
| | | dayReceivableAmount = receivableAmount.divide(new BigDecimal(curMonthMaxDay), 8, BigDecimal.ROUND_HALF_UP);// 日 实收 |
| | | } |
| | | // todo 计算 应收 |
| | | curMonthReceivableAmount = new BigDecimal(curDay).multiply(dayReceivableAmount).setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | } else { // todo 如果是整月 那就按月计算,以免 转换成天再 乘以天数后的误差 |
| | | curMonthReceivableAmount = receivableAmount; |
| | | } |
| | | // } else { // todo 如果是整月 那就按月计算,以免 转换成天再 乘以天数后的误差 |
| | | // curMonthReceivableAmount = receivableAmount; |
| | | // } |
| | | // todo 保存数据到pay_fee_detail_month |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime, deadlineTime); |
| | | |
| | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | ReportFeeMonthStatisticsTotalDto reportFeeMonthStatisticsTotalDto = new ReportFeeMonthStatisticsTotalDto(); |
| | | List<ReportFeeMonthStatisticsDto> reportList = new ArrayList<>(); |
| | | //查询该小区下的费用项目 |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(reportFeeMonthStatisticsDto.getCommunityId()); |
| | | List<FeeConfigDto> feeConfigDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | //应收总金额(大计) |
| | | Double allReceivableAmount = 0.0; |
| | | //实收金额(大计) |
| | |
| | | Double totalLateFee = 0.0; |
| | | List<String> ownerIds = new ArrayList<>(); |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) { |
| | | // FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | // feeDetailDto.setDetailId(reportFeeMonthStatistics.getDetailId()); |
| | | // List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto); |
| | | // Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误"); |
| | | // reportFeeMonthStatistics.setReceivableAmount(feeDetailDtos.get(0).getReceivableAmount()); |
| | | // reportFeeMonthStatistics.setPayableAmount(feeDetailDtos.get(0).getPayableAmount()); |
| | | //应收金额 |
| | | Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount()); |
| | | //实收金额 |
| | |
| | | if (!StringUtil.isEmpty(reportFeeMonthStatistics.getImportFeeName())) { |
| | | reportFeeMonthStatistics.setFeeName(reportFeeMonthStatistics.getImportFeeName()); |
| | | } |
| | | //费用项目 |
| | | reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos); |
| | | if (!StringUtil.isEmpty(reportFeeMonthStatistics.getRepairId())) { |
| | | RepairDto repairDto = new RepairDto(); |
| | | repairDto.setRepairId(reportFeeMonthStatistics.getRepairId()); |
| | |
| | | |
| | | UserQuestionAnswerValuePo userQuestionAnswerValuePo = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValuePo.class); |
| | | |
| | | userQuestionAnswerValuePo.setPersonId(userId); |
| | | |
| | | |
| | | return saveUserQuestionAnswerValueBMOImpl.save(userQuestionAnswerValuePo, questionAnswerTitles); |
| | |
| | | for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) { |
| | | titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex); |
| | | tmpUserUserQuestionAnswerValue = new UserQuestionAnswerValuePo(); |
| | | tmpUserUserQuestionAnswerValue.setAnswerType(userQuestionAnswerValuePo.getAnswerType()); |
| | | tmpUserUserQuestionAnswerValue.setObjId(userQuestionAnswerValuePo.getObjId()); |
| | | tmpUserUserQuestionAnswerValue.setObjType(userQuestionAnswerValuePo.getObjType()); |
| | | tmpUserUserQuestionAnswerValue.setPersonId(userQuestionAnswerValuePo.getPersonId()); |
| | | tmpUserUserQuestionAnswerValue.setQaId(userQuestionAnswerValuePo.getQaId()); |
| | | tmpUserUserQuestionAnswerValue.setScore("0"); |
| | | tmpUserUserQuestionAnswerValue.setTitleId(titleObj.getString("titleId")); |
| | | tmpUserUserQuestionAnswerValue.setUserQaId(userQuestionAnswerPo.getUserQaId()); |
| | | tmpUserUserQuestionAnswerValue.setUserTitleId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userTitleId)); |
| | |
| | | } |
| | | |
| | | //如果是领导 评价 直接返回 |
| | | String answerType = userQuestionAnswerValuePo.getAnswerType(); |
| | | String answerType = ""; |
| | | |
| | | if("2003".equals(answerType)){ |
| | | userQuestionAnswerPo.setState("1202"); |
| New file |
| | |
| | | package com.java110.user.cmd.question; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.questionAnswer.QuestionAnswerDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.user.UserQuestionAnswerDto; |
| | | import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 查询用户投票 或者问卷 |
| | | */ |
| | | @Java110Cmd(serviceCode = "question.queryOwnerQuestionAnswer") |
| | | public class QueryOwnerQuestionAnswerCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserQuestionAnswerV1InnerServiceSMO userQuestionAnswerV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "qaType", "未包含qaType"); |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | Assert.hasLength(userId, "用户未登录"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | Assert.listOnlyOne(userDtos, "用户不存在"); |
| | | UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto(); |
| | | userQuestionAnswerDto.setLink(userDtos.get(0).getTel()); |
| | | userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId")); |
| | | userQuestionAnswerDto.setQaType(reqJson.getString("qaType")); |
| | | List<QuestionAnswerDto> questionAnswerDtos = userQuestionAnswerV1InnerServiceSMOImpl.queryOwnerQuestionAnswers(userQuestionAnswerDto); |
| | | context.setResponseEntity(ResultVo.createResponseEntity(questionAnswerDtos)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.user.cmd.question; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.user.UserQuestionAnswerDto; |
| | | import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.user.UserQuestionAnswerPo; |
| | | import com.java110.po.user.UserQuestionAnswerValuePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Java110Cmd(serviceCode = "question.saveOwnerQuestionAnswer") |
| | | public class SaveOwnerQuestionAnswerCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IUserQuestionAnswerV1InnerServiceSMO userQuestionAnswerV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | Assert.hasKeyAndValue(reqJson, "userQaId", "未包含题目"); |
| | | |
| | | Assert.hasKey(reqJson, "questionAnswerTitles", "未包含答案"); |
| | | |
| | | JSONArray questionAnswerTitles = reqJson.getJSONArray("questionAnswerTitles"); |
| | | |
| | | if (questionAnswerTitles == null || questionAnswerTitles.size() < 1) { |
| | | throw new IllegalArgumentException("未包含答案"); |
| | | } |
| | | |
| | | JSONObject titleObj = null; |
| | | for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) { |
| | | titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex); |
| | | if (titleObj.containsKey("qaTitle") && !StringUtil.isEmpty(titleObj.getString("qaTitle"))) { |
| | | Assert.hasKeyAndValue(titleObj, "valueContent", titleObj.getString("qaTitle") + ",未填写答案"); |
| | | } else { |
| | | Assert.hasKeyAndValue(titleObj, "valueContent", "未填写答案"); |
| | | } |
| | | } |
| | | |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | Assert.hasLength(userId, "用户未登录"); |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | |
| | | Assert.listOnlyOne(userDtos, "用户不存在"); |
| | | |
| | | UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto(); |
| | | userQuestionAnswerDto.setUserQaId(reqJson.getString("userQaId")); |
| | | userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId")); |
| | | userQuestionAnswerDto.setLink(userDtos.get(0).getTel()); |
| | | int count = userQuestionAnswerV1InnerServiceSMOImpl.queryUserQuestionAnswersCount(userQuestionAnswerDto); |
| | | if (count < 1) { |
| | | throw new CmdException("数据不存在"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | |
| | | UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto(); |
| | | userQuestionAnswerDto.setUserQaId(reqJson.getString("userQaId")); |
| | | userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<UserQuestionAnswerDto> userQuestionAnswers = userQuestionAnswerV1InnerServiceSMOImpl.queryUserQuestionAnswers(userQuestionAnswerDto); |
| | | |
| | | Assert.listOnlyOne(userQuestionAnswers, "数据不存在"); |
| | | |
| | | JSONArray questionAnswerTitles = reqJson.getJSONArray("questionAnswerTitles"); |
| | | JSONObject titleObj = null; |
| | | UserQuestionAnswerValuePo tmpUserUserQuestionAnswerValue = null; |
| | | List<UserQuestionAnswerValuePo> tmpUserUserQuestionAnswerValues = new ArrayList<>(); |
| | | |
| | | for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) { |
| | | titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex); |
| | | tmpUserUserQuestionAnswerValue = new UserQuestionAnswerValuePo(); |
| | | tmpUserUserQuestionAnswerValue.setCommunityId(userQuestionAnswers.get(0).getCommunityId()); |
| | | tmpUserUserQuestionAnswerValue.setQaId(userQuestionAnswers.get(0).getQaId()); |
| | | tmpUserUserQuestionAnswerValue.setTitleId(titleObj.getString("titleId")); |
| | | tmpUserUserQuestionAnswerValue.setUserQaId(userQuestionAnswers.get(0).getUserQaId()); |
| | | tmpUserUserQuestionAnswerValue.setUserTitleId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userTitleId)); |
| | | if ("3003".equals(titleObj.getString("titleType"))) { |
| | | tmpUserUserQuestionAnswerValue.setValueId("999"); |
| | | tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent")); |
| | | } else { |
| | | tmpUserUserQuestionAnswerValue.setValueId(titleObj.getString("valueContent")); |
| | | tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent")); |
| | | } |
| | | tmpUserUserQuestionAnswerValues.add(tmpUserUserQuestionAnswerValue); |
| | | } |
| | | |
| | | int flag = userQuestionAnswerValueV1InnerServiceSMOImpl.saveUserQuestionAnswerValues(tmpUserUserQuestionAnswerValues); |
| | | if (flag < 0) { |
| | | throw new IllegalArgumentException("保存失败"); |
| | | } |
| | | |
| | | UserQuestionAnswerPo userQuestionAnswerPo = new UserQuestionAnswerPo(); |
| | | |
| | | userQuestionAnswerPo.setUserQaId(userQuestionAnswers.get(0).getUserQaId()); |
| | | userQuestionAnswerPo.setState("1202"); |
| | | flag = userQuestionAnswerV1InnerServiceSMOImpl.updateUserQuestionAnswer(userQuestionAnswerPo); |
| | | if (flag < 0) { |
| | | throw new IllegalArgumentException("保存失败"); |
| | | } |
| | | context.setResponseEntity(ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功")); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | package com.java110.user.dao; |
| | | |
| | | |
| | | import com.java110.dto.questionAnswer.QuestionAnswerDto; |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | |
| | | int queryUserQuestionAnswersCount(Map info); |
| | | |
| | | int saveUserQuestionAnswers(Map info); |
| | | |
| | | List<Map> queryOwnerQuestionAnswers(Map info); |
| | | } |
| | |
| | | */ |
| | | int queryUserQuestionAnswerValuesCount(Map info); |
| | | |
| | | /** |
| | | * 批量保存 |
| | | * @param infos |
| | | * @return |
| | | */ |
| | | int saveUserQuestionAnswerValues(Map infos); |
| | | } |
| | |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> queryOwnerQuestionAnswers(Map info) { |
| | | logger.debug("查询 queryOwnerQuestionAnswers 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("userQuestionAnswerV1ServiceDaoImpl.queryOwnerQuestionAnswers",info); |
| | | |
| | | return infos; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return Integer.parseInt(businessUserQuestionAnswerValueInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public int saveUserQuestionAnswerValues(Map infos) { |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("userQuestionAnswerValueV1ServiceDaoImpl.saveUserQuestionAnswerValues",infos); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.java110.user.smo.impl; |
| | | |
| | | |
| | | import com.java110.dto.questionAnswer.QuestionAnswerDto; |
| | | import com.java110.user.dao.IUserQuestionAnswerV1ServiceDao; |
| | | import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO; |
| | | import com.java110.dto.user.UserQuestionAnswerDto; |
| | |
| | | |
| | | |
| | | @Override |
| | | public int saveUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | public int saveUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | int saveFlag = userQuestionAnswerV1ServiceDaoImpl.saveUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo)); |
| | | return saveFlag; |
| | | } |
| | |
| | | @Override |
| | | public int saveUserQuestionAnswers(@RequestBody List<UserQuestionAnswerPo> userQuestionAnswerPos) { |
| | | Map info = new HashMap(); |
| | | info.put("userQuestionAnswerPos",userQuestionAnswerPos); |
| | | info.put("userQuestionAnswerPos", userQuestionAnswerPos); |
| | | int saveFlag = userQuestionAnswerV1ServiceDaoImpl.saveUserQuestionAnswers(info); |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int updateUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | public int updateUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | userQuestionAnswerPo.setStatusCd("1"); |
| | | int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo)); |
| | | return saveFlag; |
| | | @Override |
| | | public int deleteUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) { |
| | | userQuestionAnswerPo.setStatusCd("1"); |
| | | int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<UserQuestionAnswerDto> queryUserQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) { |
| | | public List<UserQuestionAnswerDto> queryUserQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | |
| | | |
| | | @Override |
| | | public int queryUserQuestionAnswersCount(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) { |
| | | return userQuestionAnswerV1ServiceDaoImpl.queryUserQuestionAnswersCount(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto)); } |
| | | return userQuestionAnswerV1ServiceDaoImpl.queryUserQuestionAnswersCount(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto)); |
| | | } |
| | | |
| | | @Override |
| | | public List<QuestionAnswerDto> queryOwnerQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) { |
| | | List<QuestionAnswerDto> questionAnswerDtos = BeanConvertUtil.covertBeanList( |
| | | userQuestionAnswerV1ServiceDaoImpl.queryOwnerQuestionAnswers(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto)), |
| | | QuestionAnswerDto.class); |
| | | return questionAnswerDtos; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.user.dao.IUserQuestionAnswerValueV1ServiceDao; |
| | | import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO; |
| | | import com.java110.dto.user.UserQuestionAnswerValueDto; |
| | | import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo; |
| | | import com.java110.po.user.UserQuestionAnswerValuePo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用 |
| | |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | @Override |
| | | public int saveUserQuestionAnswerValues(@RequestBody List<UserQuestionAnswerValuePo> userUserQuestionAnswerValues) { |
| | | Map infos = new HashMap(); |
| | | infos.put("userUserQuestionAnswerValues",userUserQuestionAnswerValues); |
| | | int saveFlag = userQuestionAnswerValueV1ServiceDaoImpl.saveUserQuestionAnswerValues(infos); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateUserQuestionAnswerValue(@RequestBody UserQuestionAnswerValuePo userQuestionAnswerValuePo) { |
| | | int saveFlag = userQuestionAnswerValueV1ServiceDaoImpl.updateUserQuestionAnswerValueInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerValuePo)); |
| | | return saveFlag; |