Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	carbon-admin/carbon-admin-service/src/main/java/com/hcloud/microserver/system/bank/service/impl/ProductInfoServiceImpl.java
qiubo 4 жил өмнө
parent
commit
6e43ccc945

+ 5 - 2
carbon-back/carbon-back-service/src/main/resources/carbon/ProductBelongMapper.xml

@@ -200,8 +200,11 @@
     </delete>
 
     <select id="selectByProductGuid" parameterType="string" resultMap="BaseResultMap">
-        select <include refid="Base_Column_List"></include> from t_product_belong
-        where fk_product_guid = #{productInfoGuid,jdbcType=CHAR}
+         select guid, fk_product_guid, fk_farmer_guid, fk_collective_guid,
+            (CASE belong_type WHEN 1 THEN farmer_name ELSE farmer_village END ) AS farmer_name,
+            farmer_village, farmer_num, state, create_time, modified_time, belong_type
+          from t_product_belong
+          where fk_product_guid = #{productInfoGuid,jdbcType=CHAR}
     </select>
 
     <delete id="deleteByProductInfoGuids" parameterType="list">

+ 9 - 0
common-core/src/main/java/com/hcloud/microserver/commoncore/util/reflect/DateUtils.java

@@ -95,6 +95,15 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return DateFormatUtils.format(now, "yyyy/MM/dd");
     }
 
+    /**
+     * 日期路径 即年/月/日 如2018/08/08
+     */
+    public static final String year()
+    {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyy");
+    }
+
     /**
      * 日期路径 即年/月/日 如20180808
      */